Is there a limit on file size upload?

Hi all,

I have a ‘small’ XOJO Cloud server and for a web app I want to upload very small videos (100-300 kb). This works fine, but trying to upload a slightly larger video (894 kb) files silently.

I compressed this and can get it to work as expected in the videos are less that somewhere between 500 kb and 700 kb.

Is there a size restriction for files to be uploaded? (influenced but the ‘small’ server perhaps?) - seems pretty meagre size allocation, at present this small videos seem to have to be below 500 kb to upload. This is not something that is apparent when choosing server size!

Many thanks,
Stam

Actually on further testing it may not be an issue with the size. It might be an issue with encoding but I have no idea why that would be.
I attach the original video that cannot be uploaded and the video I’ve re-encoded without compression, roughly the same size, but which does upload as expected:

9-12.mp4.zip (873.1 KB)
9-12-reencoded-same-size.mp4.zip (822.5 KB)

Grateful for any insights!

Hi Stam - I’m able to upload both files to this app (running on a small Xojo Cloud server). Will both upload if you try this app?

https://jason0829.xojocloud.net

Hi Jason, sorry for the delayed response (real life getting in the way…).
Yes, your example works.
My app currently has a library of 99 such videos and the attached is the only one that fails.

I re-encoded it with FFMPEG with and without compression, but the video 9-12.mp4 stubbornly refuses to be uploaded as it is, even though for all intents and purposes it’s a normal h.264 encoded video that actually does upload on your example… not sure what is going on with that…

Yeah, that happens sometimes :slight_smile:

Do you have a filter set for the WebFileUploader? The project that I posted is the built-in WebFileUploader example project and I removed the filter.

The filter wouldn’t cause an upload to silently fail. It’s just there to prevent the user from selecting a file type that you don’t support. Otherwise there’s no checking being done.

So… there’s this point at which the uploader engine has to decide between keeping the upload in memory or whether to write a temp file to disk. When I left, I believe that threshold was set to 256K. It could be that the file in question is being written to disk and the framework is unable to read it for some reason, but I would expect the same thing to happen if you ran it locally on a macOS or Linux system for testing purposes.

1 Like

Weirdly I generated a larger file from the same movie with FFmpeg (1 Mb) which uploaded just fine as did same sized re-encoded or compressed to smaller sizes with FFmpeg.

The other 98 movies for this app uploaded fine. It’s just this one stubborn movie that still now fails both when I run this from the IDE (Mac OS), or upload to Xojo Cloud (presumably Linux). 99 movies sound like a lot, but on the whole they’re around 300 kb each (~ 1 sec, running loop for cardiac imaging assessments).

This web app will be taken up by other hospitals and it is going to cause issues if 1% of the imaging silently fails to upload - and I can’t see my colleagues re-encoding videos with FFmpeg even if they did notice the failed upload.

Could you require them to zip the files?

Not sure that would work for me - the app is an online test for resident doctors and the short looping videos are part of this test. Each needs metadata allocated to it, and grouped for specific teams of residents. Having the app then process a zip just seems like a level of pain above what I was looking for!

I’m hoping this is just an errant .mp4 in some way…

If not and affects a small percentage of .mp4s, I’ll need to create a utility for ‘admins’ to re-encode, but that will require installing FFmpeg, which requires some terminal knowledge and almost guaranteed to be an issue in our locked-down work PCs…