Friday, October 28, 2016

question about returning file (pdf,image,zip...) in a request that made from temporary URL

hello
think of a downloading website:
when we create a temporary link in django and map it to actual URL or file path in database like this:

id -- temporary_URL -- origin_URL  --  file_path

so when a user used a temporary URL and directed to some view , how should i return that file from that view for user to be able to download that file?
i know that i can use "FileResponse"  or  "StreamingHttpResponse" but in django documentation says that we should use these for short-lived requests but downloading a big file can take long time, so what should i do ?
i appreciate any help and idea

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/691d2358-77c7-49b3-bfe1-9b54c29262ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment