alican / django-tus

Django app implementing server side of tus protocol to powering resumable file uploads for django projects. More Info about: http://tus.io/
MIT License
49 stars 32 forks source link

Would like to have "filelocation" metadata to be able to position the uploaded file to a specific directory #22

Open jlmarkham opened 3 years ago

jlmarkham commented 3 years ago

Description

This is an enhancement request (which I would be happy to do for you). We would like to be able to specify where the uploaded file should go to (relative to the TUS_DESTINATION_DIR). In our system, the uploaded files belong to Django database objects and we would like to to location them to a specific location after they've been uploaded. We suggest a new metadata field ("filelocation") that will specify where the file will be placed. "filelocation" would be relative to the TUS_DESTINATION_DIR.

Having all files in the "media" directory doesn't quite work for our purposes.

What I Did

Not relevant to this issue.

RubenGarcia commented 3 years ago

This can be done using a @receiver(tus_upload_finished_signal) on a per-application basis.