Multiple file size on same page

Hello All,
I have single page with two different file upload options. At one file upload option I want max 10mb limit for pdf,txt,docs but fot another widget I want 50mb max limit since the purpose of 2nd widget is different.
I could set at global level but how to have different file size upload on same page?

Hi @Tarun

Yes, you’re right that you can set a global max upload file size. To set this at 2 different limits, I think you can approach this in a Pythonic way by checking the file size once the file has been uploaded, and if it exceeds the imposed limit that you set (via an if conditional check), then return an error message.

Here are some resources on doing this:

Hope this helps!

I will be able to handle that via some python logic, but I am not sure how to atleast remove this size limit from front end, since my FE will still show 50mb or 5mb at both the places, any way I can change atleast what is shown to use?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.