For other to use, the final version for downloading the file is
bellow. ReferenceFile is my model.
import mimetypes
from django.core.servers.basehttp import FileWrapper
from django.http import HttpResponse
def download(request, id):
file_to_download = get_object_or_404(ReferenceFile,
I found a solution on the second part, sending the file back to the
user with the original filename here:
http://stackoverflow.com/questions/1156246/having-django-serve-downloadable-files
I would still need some help on the first part.
Thanks,
Gabriel
On 11 feb., 14:57, Gabriel - Iulian
Hi guys,
I want to do this:
1. from admin I want to upload a file, store the original filename but
change it on the storage device, based on the current date, for
example 20110211144900.file
2. if at a later time someone wants to download that file, it should
get it back and saved to the local
3 matches
Mail list logo