Quality of Images sending from my cellphone to Google Drive

Dear Friends:

I have some problems with an app that I prepared to upload photos from my cellphone to google drive.
The app works, however the quality of the pictures are too bad.
Please help me.
Kind regards

Gerson Anicama Acosta
[mod edit personal information removed, use the Private Messaging facility on the community]



Try sending the orange imageBase64Data block, instead the label text.

Regarding the "quality" of images, is this after taking the picture on your device, or when you view the uploaded image on google drive ?

Im sending my AIA file

SNC_ANTAMINA_CW1_12092023.aia (218.9 KB)

I see the images with "poor" quality on google drive, after the Base codification, decodification and after the script procedure.
Im sending the AIA, please check it... Ive erased the urls Im using now, instead of that I put the following:


You could try something like this:

This converts and uploads the actual image file.

In tests:
on my device image = 4.7mb
convert and upload....
on google drive image = 4.7mb

Don't try to put the base64String into a label with images of this size, it may crash your app

I'm trying to use the structure you've sent.
However, How can I send the images to the correct path in google drive? in which step I'm sending the photos? when I call the url of the script?
I dont understand the purpose of the block KIO4_Base641.GotString, can you explain how it works please.
Can you send me you file in AIA to study the blocks please?

My intention to prepair this app is to send photos from my camera in my cellphone to a particular file in google drive... so I use a url from the google drive location (place to store the photos), and another url of a script that decodes the base64 photos to a photo format again. I'm not sure, but I may conclude that the process of using base64 to string, then use google scripts reduce the size of the photographs and we can't do anything.

Many thanks for your comments and your help.
Kind Regards
Gerson Anicama Acosta

Keep using the google apps script you already have

Yes (actually it it invoked by the call Web1.PostText block)

It is an async approach. You generate the base64String from the file using the:
call KIO4_Base641.FiileToStringASD block
The ouput (the base64String) is returned in the when KIO4_Base641.GotString event, using the string parameter.

All the blocks used are there, but here is an aia project for you to try. You will need to add your own script url.

camImgToGDrive2.aia (25.9 KB)

:question: why ?

This is not the case. The base64String is a representation of all the bytes in the image. What was probably heppening is through the use of the imagetobase64 block, and the setting for your image components. AI2 resizes the full image from the camera when displayed if the image component height and with are automatic, so your base64 output could be using that small image. As I showed above, this original method I have offered uses the original camera image file.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.