mbraak/django-file-form

Anything similar to s3_upload_dir for tus upload?

BoPeng opened this issue · 3 comments

I am using s3_upload_dir = self.request.user.username to separate uploads from multiple users and found it convenient.Perhaps I have missed something obvious but I am wondering if django-file-form has a similar mechanism for adding form specific subdirectory for tus upload. If not, can we add something to balance the feature sets for tus and s3 uploads?

It is of course possible to save the end result to a specific directory (in the form.save). But this feature does not exist for the temporary files (in media/temp_uploads). We can add this feature, but I would like to know the use case. Why is it important to separate the uploads for different users?

Say for example an application has a few upload forms, one for teacher to upload their tests and one for students to upload their completed ones. It would be easier to see who has uploaded what from S3 or admin interface.Here the form-specific directory could be by user name or by role.

Also for example an application have a large amount of uploads that could be ignored and orphaned by the application. If the form upload by date then it would be easy to delete unprocessed uploads from backend.

In general it is difficult for me to justify a large site having all uploads from all users dumped into the same directory.

Edit: I think it all depends on how likely users (or sometimes developers) will look into the backend and check uploaded files directly. I suppose S3 has a much stronger case than tus.

Yes, it seems more useful on S3. This has no priority at the moment.