🟦 Upload Any File to Google Drive, using Google Drive API

iconGDC96

It can be tricky to get setup, but once done, uploading files is pretty straightforward.

Where I mention service accounts, I actually mean "0Auth Client ID"s :upside_down_face:

Update: now includes information about downloading files from Google Drive, and listing files on Google Drive (see the Addendum)

3 Likes

PERFECTO ahora quiero saber como puedo hacer que app inventor lea archivos (fotos)
quiero hacer una app que me muestre fotos usando la url de google drive, las url estΓ‘n guardada en google sheets

I prepared my api and blocks and connect api to the demo aia file provided in the tutorial
But the aia file only upload file from assets

And when I tried to upload file from my internal storage it didn't work and gave me error
I tried to solve problems but without any success

I need help .

What about revealing that error message and providing a screenshot of your relevant blocks?

Taifun

You need to provide an absolute path in filepath

For example

If filename is orange.png and it is located in your ASD, then the filepath would be:

/storage/emulated/0/Android/data/<packageName>/files/

ok thanks after several tries finally
worked with this :

I run clock to get the result

Why are you using curl ? Why not just use the blocks provided ?

Not all Android devices provide curl (accessible to the terminal extension) or have curl installed.

I already tried with provided web component blocks but it only uploads the image file in assets that named "iconGDC512.png" but for other files from internal storage or ASD it didn't work at all

Works fine here if you provide the correct path to the file.

image

Remember the aia project provided is just a demo, you would need to rework the filename/filepath settings to your own requirements....

1 Like

ok, I will give it another try ? thanks @TIMAI2