Sending a Picture and location data to googlesheet - using a solution by TimAI2 found on old forum

Yes you will, because the script is set to only work with doPost(e) - so you have to run it from the app or test with “Postman”.You would also need to be adding all the parameters to the end of the url.

What response content are you getting from the app? (You can edit all the error messages in the script so that you know which one is which - but don’t forget to republish the web app to a new version)

Hi Tim - thanks. Yes I did that already. I edited the error messages slighly - so can tell which one.
When I run the app on the mobile - takes the pic. shows the location and upload button.

when I press the Upload button - quite quickly get the Error Message in App Inventor -Error:Pleas TRy Again - in Red -

so the error msg is from the App rather than the script. I checked no data or image saved.

Are your script settings like this:

Have you re-published the scrtip to a new version and reviewed permissions ?

Also, change your web1.gottext to look like this:

1 Like

deleted as issue found

Sorry - ignore - I was being stupid - In Google drive access was not set correctly - and the link was missing a digit. For anyone else - Access needs to be “Any one on Internet can find and edit”.
Thanks Tim for your help and patience.

If the script is running as “you” (your google account) and “you” also own the spreadsheet and the folder, the google drive/sheet access permissions can be tighter - even “private only me”. Try it.

que tal TimAI2
gracias a tus conocimientos e podido desarrollar aplicaciones con Spreadsheet de Google

el tema del mensaje es que las fotos cuando envio a google drive sale 45 grados en su carpero y tambien en la file del Spreadsheet de Google

y no se porque sale eso

te mando el acceso de las carpetas
la carpeta de Google Drive :

y del Spreadsheet de Google y del Google Apps Script :

https://drive.google.com/drive/folders/1iX7Pbqr69u4rCXSdy7aQIit2ue-WzULY?usp=sharing

sip.aia (31.9 KB)

Gracias por tu futura respuesta

hola timAl2
me podrías ayudar cual es el error

saludos cordiales

You will need to assess the image taken on the camera: is it landscape or portrait, resolve this, then upload to google drive. Try using Taifun’s Image extension.

Si se utizo esa extension el tema esta es que el error esta que el app de camara que viene por defecto lo toma la foto y te da como resultado inclidado a la izquierda.
Estoy utilizando el app Line Camara que puse por establecido para que tome las foto y si se muestra

Your blocks show using the app Inventor camera component?

I do not know how the line camera app works, but the Image extension (or the Metadata extension) may be able to help you.

gracias TImAI2

como se muestra en la imagen yo descarge el aia de metadatos y tomate una foto con mi celular de marca LG Q60 y me sale ese mismo error

orientation right side,top (rotate 90 cw)

As you have seen, different devices give back different information, and handle their camera images in different ways. It would also be difficult to programmatically set the orientation correctly with a square image. You may have to present a preview to your user in the app, leaving it for them to decide if rotation is required, prior to uploading to google drive, if you can figure out which ones will be rotated on google drive. (Some devices return the image rotated 180 degrees!

Que tal. TImAI2. Te comento que comencé a tomar foto a la orientación hacia la izquierda de la y si me guarda a la orientación correcta en el google drive

Una consulta cuanto seria la medida necesaria
Para el tema del maxwidth y el maxheight

Please explain the issue you need to resolve in more detail. I do not understand what your problem is…

Me referia al tamaño de la imagen porque cuando la imagen es mas grande el aplicativo demora en el proceso de enviar los datos y cuando la imagen es pequeña se pierde la resolución
Para el tema de la imagen el tamaño en el maxwidth y el maxheight
Cual seria el recomendable.

Maxwidth :600
Maxheigth: 400
Aumentar las unidades de medida
Y si es asi cuanto seria lo recomendable
Saludos

There is really no correct answer! It all depends on what you want to do with the image once it is uploaded to google drive.

If it will only ever be viewed as you have shown on your spreadsheet, then thumbnail sized images of 128x128 px would be fine (see the thumbnail extension here). - maxheight 128 maxwidth 128

If you want to view the images at full screen size then you would need to consider a much larger image: maxheight 1080 maxwidth 1980. This will of course mean a larger file size and longer upload time (and use up more storage space of your google quota)

640 x 360 px max (aspect ratio of 1.77) would be good for general use.

As I said, it really does depend on your intended end use.

Tener un reporte en tiempo real en formato pdf desde el cell

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