In my country the internet connection is very bad, the upload speed is very slow, so if I’m trying to upload 10MB image, it could take 2-3 minutes to complete, then Discourse give me the error alert when the uploading is finished
I’ve checked the code that Discourse optimize the uploaded image until reach SiteSetting.max_image_size_kb value, otherwise it can’t save the image
Any idea how this could be solved?
Actually I would like to send pull request to add more message on each instructions, but I’m not convince that it will be accepted
OK so the root issue is that we can’t tell you that your file was rejected until after it is uploaded.
But: if you are operating from a place with terrible bandwidth, why would you upload a very large image to start with? That doesn’t make sense to me.
I appreciate the contribution, but I feel this is not the correct solution, and it adds a fair bit of code and new translations, and does not address the root problem at all: you don’t know that your upload was rejected until after you upload it.
The types of users that will get this wrong, are unlikely to click a “read more” in my opinion.
Can you try again with an image which is at least 30MB? Depending on the filesystem, the size of the file can vary slightly and a 26MB image might actually only require a bit less than 25MB on another filesystem
(They might be automatically downsizing images too)
I just uploaded an image from this page, I picked world.topo.bathy.200406.3x21600x21600.C1.jpg image, they say that is 36 MB, but on my laptop the size is 88,661,060 bytes (88.7 MB on disk), however the result is succeed, it’s on my fb
but sometimes Discourse’s image compressor able to compress the image file
into significant smaller size
e.g.: the file size limit is 10MB, and an user uploaded 15 MB image, then
validation status will depend on image compressor, is it succeeds or not to
compress the image until under 10MB
This issue is very real in my community. What is odd is that people in low bandwidth countries often try to upload a big file to discourse, it fails, then they email it to me using Gmail and ask me to post it for them. I then resize it myself before uploading and it works. Go figure.
So maybe Gmail has a more failsafe upload system for large files?
Is there no way to have the client check the file size and complain if it is big, eg more than 1mb, then give a warning before proceeding?