Cadasta / cadasta-platform

[DEPRECATED] Main repository of the Cadasta platform. Technology to help communities document their land rights around the world.
https://demo.cadasta.org
GNU Affero General Public License v3.0
53 stars 81 forks source link

File uploads permitted exceeding max size #1683

Closed amplifi closed 7 years ago

amplifi commented 7 years ago

Steps to reproduce the error

Attempt to upload a resource file greater than the current max file size.

Actual behavior

S3 upload commences.

Expected behavior

File upload should be rejected with an error message to the user. Ref #1675

seav commented 7 years ago

To add more information, the upload does commence but afterwards, I get the "Not able to upload file" error message with no other information why the upload failed.

oliverroick commented 7 years ago

I can't reproduce this; I tried to upload an 11.5MB PDF and it is rejected by S3. Like @seav pointed out I get a generic error message, it looks like the updated JS is not in static.

@amplifi: to clarify, does the file upload and then you get an error? Or don't you get an error at all?

amplifi commented 7 years ago

@oliverroick It allowed me to upload a 220MB mp4 file, and gave the generic error message. The file was still in S3 but not registered as a resource.

The updated js file is not in static because the django-buckets package isn't configured correctly. pip shows the latest version on staging, but the new js file was never installed during setup. The same issue occurred last time the django-buckets js file was updated months ago, but was attributed to Django's static file handling.