The problem is when I am trying to upload large image, there is no information regarding the file size limit of uploaded image. Please take a look at following screenshot
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.
I have planned to add information in simple text format, but I want to make
it reusable in other functions, so that’s why the UI is like clickable
format and add more code
It wouldn’t but it still feels like trivia for the sake of trivia. Do Twitter or Facebook print a max next to their image upload controls for profiles? I doubt it.
Checked via desktop sites…
No, they don’t - simply selecting “upload” shows a file dialog.
They don’t show any size indicator for profile pictures nor images, simply an upload link / button.
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
yes agreeed
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?
this is back again on my site. people really struggle with this why not indicate a file size limit on the picture upload page? Or (better) sort of better error handling when a picture upgrade fails?
Here’s what people commonly see on my site. See screenshot sent to me by a member of my site.