In testing my app in Singapore, it has been taking as much as 90 seconds to upload a photo.
server location in US
photos uncompressed before upload
As 1 is unlikely to be solved anytime soon, would Adalo like to improve their native file picker to compress photos before upload? Give us control in the settings to determine size / quality. Regardless of server location, a compression option is better for all apps using Adalo surely.
Have others in the forum been able to overcome this issue?
During the process of the component Image Picker it appears to go black when the image is uploaded, then flash reloads with the same image.
I believe what is happening is the image is uploaded, then the same image is served from imgix, now compressed. So I am uploading a 2MB photo, to then immediately download a 600KB copy of the same photo. Can anybody on the forum confirm the same?
I think this might be something that @Victor has experience in.
You’re almost right.
Inspecting a traffic for an image uploader shows that first it uploads the image (POST request I guess in Base64 encoding which means that the amount of data transferred is larger than the image).
On the 2nd step the image is returned back to the app. BUT I don’t see any size optimizations here (not sure if they were before?).
Original image size is 2.3 MB, and the same one is returned (you see no options after “?” in the URL on the left).
There is no surprise image uploads work very slow
As a side note: according to my knowledge it is possible to create a component which reduces image size before uploading for the native apps, though it might be more difficult to do this for webapps. Though I’ve never seen such component developed by anyone
Two decades ago I used JUpload to compress before upload in the browser. Worked like a charm. I have read a little and see that it is possible in react, indeed other apps do it.
This is disappointing to say the least. I don’t feel it should be on us to find a solution (I will be raising a ticket).
@theadaloguy
Thanks for the info. I need the combined functionality of camera or upload from gallery. So I feel a component update at least is needed from Adalo.
Ideally with built in compression.
Even better with custom API choices but I imagine that will need a full custom component. I may be surprised yet.
@Rozza Yes, you get both functionality of camera and pick from gallery. You also get to restrict file, limit file sizes and more. Speed wise you can upload videos quickly also.
Yes, the webview allows us to securely and quickly upload files directly to the Amazon S3 servers. As far as I know, Adalify File Uploader is the only way to upload and store files without the file/image being publically accessible at some point in the chain - any serious production app should be using it. That’s before mentioning the huge speed advantage, stability (never had downtime), extra features and customizability.
In terms of compression…
Once you get your image URL back you can run it through a compression API later with a custom action perhaps, otherwise have something on the back end on your Amazon S3 to do it for you. This part of the process is out of the scope of Adalify, but absolutely something you can implement yourself.