juliomalegria / django-chunked-upload

Upload large files to Django in multiple chunks, with the ability to resume if the upload is interrupted.
MIT No Attribution
214 stars 71 forks source link

File extension after upload #15

Closed fiusuki closed 9 years ago

fiusuki commented 9 years ago

Hi, I tested your app, using your demo, and when the download finishes the file extension keeps as ".part". Am I doing something wrong? Thanks for this product!

juliomalegria commented 9 years ago

Hey @fiusuki, So the way django-chunked-upload works is it creates a file called <upload_id>.part, and it uses it to append the chunks you send on each request. Once you finish uploading all the chunks and send the /complete request, the on_completionmethod will be called, and the uploaded file will be passed as a parameter. In this method is where you'd implement whatever logic you want to do with that file. Could be store it somewhere in your media folder, associate it to a model's instance, open the file and analyze/parse it, etc. That's entirely up to you. In the demo, the on_completion method is not doing anything, that's why you only see the .part file. I hope that answers your question :)

fiusuki commented 9 years ago

Perfect! Thanks for your answer! :)