Python Django - Saving ContentFile to Local Files -
i'm using contentfile django python , have contentfile uploading web server.
what save contentfile (it pdf) onto local machine.
in : type(file_contents) out : <class 'django.core.files.base.contentfile'> django.core.files.storage import default_storage path = default_storage.save('/tmp/file.pdf', file_contents) in:path out:u'/tmp/file.pdf'
i can't find file anywhere on local machine ... recognize might doing wrong, here great. want able find pdf on local machine see looks like.
the server can't save files local machine. local browser can that. thing server can present file download browser.
Comments
Post a Comment