Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing fallback support for ordinary file upload #169

Open
brianhelba opened this issue Jan 12, 2021 · 0 comments
Open

Consider removing fallback support for ordinary file upload #169

brianhelba opened this issue Jan 12, 2021 · 0 comments

Comments

@brianhelba
Copy link
Contributor

Currently, if a file is uploaded directly via a multipart/form-data request to a server-rendered form (the traditional behavior of FileField), it will trigger a fallback behavior to be accepted and stored: https://github.com/girder/django-s3-file-field/blob/f4c48d42bfdf765550271cdb7f908bbc616c78e9/s3_file_field/widgets.py#L77

This generally happens because the form's Javascript assets were not loaded properly, likely because either:

  1. The developer forgot to include {{ form.media }} in the template for the form
  2. The end user blocked Javascript

The current fallback is generally undesirable for case 1, since it disguises an important programming error.

For case 2, the behavior may or may not be desirable. The fallback does allow such end users to sometimes succeed in uploading a file, but at the cost of tying up a request thread on the server and bypassing all the functionality of S3FF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant