I was using file upload to allow users to upload images and save it in Gateway locally using event.file.copyTo(filename). However, when file size is more than 1MB, file was not saved. Upload component was showing successfully uploaded. Does anyone have similar encounter? Any recommendations on the solution?
Tried pdf files and it’s the same.
File size limit is set at 10MB
Ignition 8.1.11 running on Ubuntu 20.04
Hmm, there might be an implicit maximum file size imposed by Jetty, though I would expect that to trigger something in the logs. Are these file uploads being triggered on a desktop computer, or a mobile device? Any chance you could wireshark the upload request?
There's some configuration you can do to Jetty, though again, I'm not sure this is even the source of the problem:
I was just able to upload a 175mB file to a remote host running 8.1.11 (and no customizations to web.xml, etc) with no issues. You may need to investigate your network further with Wireshark.
I managed to solve the problem. I’m running the gateway behind a Nginx reverse proxy and by default, the maximum upload file size is 1MB. I just need to add the below statement inside server{} to increase the limit.
client_max_body_size 15M;