How can I Store any Picture Directly to my Google Drive and get the URL?

Hii, I need to make a small app to pickup / Select profile picture image and store in google drive. Can you help?
Better to Without extension…

Also I want to Resize Without extension…

  1. I believe you can achieve it via apps script
  2. add the scripts in any googlesheet , deploy. Convert your picture into base64
  3. upload the file into googledrive then get url

i hope timAi2 has plenty of codes in his site or you may have idea to do so after visiting his tutorials

@TimAi2 guides will help you

Hey Piush,

As mentioned, using Google Apps Script with a linked Google Sheet is probably your best option if you want to avoid extensions. You’ll need to convert the image to base64, send it to the script, and have the script handle the upload and return the file URL. TimAi2’s guides are a solid place to start.

here is your solution.

Step 1: Create Google Apps Script for Drive Upload

1. Go to https://script.google.com and start a new project.

2. Paste this code:

REPLACE folder id

function doPost(e) {

    var data = Utilities.base64Decode(e.parameters.data);

    var blob = Utilities.newBlob(data, e.parameters.mimetype, e.parameters.filename);

    var fileID = DriveApp.getFolderById('Google Drive Folder ID').createFile(blob).getId();

    return ContentService.createTextOutput(fileID);

    }

3. Save it and click Deploy > Manage deployments.

  • Click + New deployment
  • Select Web App
  • Set:
    • Execute as: Me
    • Who has access: Anyone
  • Click Deploy and allow permissions.
  • Copy the web app URL — you’ll use this in Kodular.

:mobile_phone: Step 2: Kodular Blocks Setup

:package: Blocks.

extension for encode the image :
com.sunny.Filey.aix (10.6 KB)
(thanks to @vknow360)

if helpful mark as solution.

It is Not Working…


did u set folder id here ??

also in the webpost block in folderid set your folder id here not name .

It is Also Telling the Same
I have Changed the Folder ID in Both Script and Kodular…

In script the folder id seem space it should no space and would u plz show updated block

There is No Space… It seems Like That… I tried…

Show your blocks plz.

Try with picker and because file path means file location not kodular Asset

It is Saying that READ_EXTERNAL_STORAGE Access Denied…

Even After Asking for the permission

May try this

Use the function uploadfiletodrive and from the event listener get the file url

I just Want to Upload My Picture And Get its URL…

I am Not Understanding This all… I am a Teenager Developer… I don’t have much Experience…

I want Data Like This

@Piush_Mandal It must be blank.

It could be solved by Go to app settings and enable permissions.

Hi @Piush_Mandal
Just go to app settings and enable read and write permissions.
It works perfectly with the picker when you get the file ID. You can use it.