View Issue Details

IDProjectCategoryView StatusLast Update
0025464mantisbtattachmentspublic2019-03-16 20:20
Reportercproensa Assigned Tocproensa  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.20.0 
Target Version2.20.0Fixed in Version2.20.0 
Summary0025464: Enforce max-filesize in dropzone to alert and drop big files before form submission
Description

Seems like the option for max-filesize in Dropzone upload does nothing. I can submit any file but if the size is big enough, it's silently ignored
I expect some kind of verification or notification from the client side before the file is uploaded.

TagsNo tags attached.

Relationships

related to 0025452 closedcproensa there is no validation on $g_max_file_size 
related to 0021801 closedcproensa File attachment GUI allows larger files than permitted 
related to 0022588 closedcproensa Oversize upload is now skipped with no Message prompted 

Activities

cproensa

cproensa

2019-02-09 15:28

developer   ~0061470

There is a message that appears when the cursor hovers over the file box.
I've never realized that existed, after the years, so it's a good indication that this could be improved.

cproensa

cproensa

2019-03-05 16:43

developer   ~0061634

I have update the summary to better reflect the implemented changes.

Related Changesets

MantisBT: master cb23a6e1

2019-02-09 15:36

cproensa

Committer: atrol


Details Diff
Reject files in client side Dropzone

Catch the event for file added and check the file size to be under the
maximum allowed size for uploads. If file is bigger, a warning message
is shown and the file is rejected.

Change how the max_file_size is passed to client, so that now we have
the exact value in bytes to compare, even though Dropzone will still
be configured with an aproximation in MiB.

Fixes: 0025464
Affected Issues
0025464
mod - core/print_api.php Diff File
mod - js/common.js Diff File