You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a feature request and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
When using maxFileSize restriction and the compressor plugin the file size check is applied to the original file size not the compressed and resized file.
for example I have users who want to upload ridiculously huge images from their phone (sometimes > 15MB). but I only want a much smaller image accepted, so I have Compressor configured to resize to a max 1024 width and 60% quality. thus I get a 100-200KB image, which is well below the server-accepted max of 3MB.
However, in order to accomplish that I have to set uppy"s max size to a VERY large number, and lose the ability to show warnings about the 3MB actual limit post compression.
Solution
Have the ability to postpone the maxFileSize until later in the process.
Alternatives
?
The text was updated successfully, but these errors were encountered:
Hi, I understand this doesn"t make sense but currently it"s hard to change. Restrictions live inside @uppy/core and are called immediately when files are added. @uppy/compressor is a pre-processor called right before uploading.
It"s probably best to disable restrictions in your case and create your own pre-processor, which you .use() after @uppy/compressor, and validate there.
Initial checklist
Problem
When using maxFileSize restriction and the compressor plugin the file size check is applied to the original file size not the compressed and resized file.
for example I have users who want to upload ridiculously huge images from their phone (sometimes > 15MB). but I only want a much smaller image accepted, so I have Compressor configured to resize to a max 1024 width and 60% quality. thus I get a 100-200KB image, which is well below the server-accepted max of 3MB.
However, in order to accomplish that I have to set uppy"s max size to a VERY large number, and lose the ability to show warnings about the 3MB actual limit post compression.
Solution
Have the ability to postpone the maxFileSize until later in the process.
Alternatives
?
The text was updated successfully, but these errors were encountered: