[HTML] Upload Files to Google Drive via HTML Form

- An employer has an online hosting form where job applicants can upload their resume or information. A designer needs a storage space where clients can easily upload images, ... Google Form is a decalation but the details is not upload the file up Google Drive information through the form you create. [Upload files to Google Code]

- The other option is to have a shared folder in Google Drive but it has limitations. First, you need to have a Gmail account and be invited by the folder owner to upload files in a shared folder. Second, all collaborators can view and even remove files that have been uploaded in a shared folder on Google Drive.

Upload Files to Google Drive via HTML Form

- Sign in to your Google account and go to https://www.google.com/script/start/ and click on the Start Scripting button

- Paste the code below into the *.gs file and save
https://pastebin.com/kFj7HUnt

- Next, create a file with the name form.html by going to menu File -> New -> Html file
https://pastebin.com/6m7EDrgd

- At menu Run -> doGet to authorize the script. So that it can upload files from form.html to your Google Drive
- Next, select Publish -> Deploy as web app and click Save New Version, grant access to the app by selecting the drop down menu (you can choose anyone can upload files to your Google Drive) by selecting Anyone, even anonymous). And you will be given an address where anyone can access it to upload files to your Google Drive.

DEMO : https://www.hungvb.com/upload

Wished everyone success
Thanks For Watching.
Next Post Previous Post
2 Comments
  • Anonymous Hz
    Anonymous Hz Thứ Ba, 12 tháng 4, 2022

    Link die.

  • CSKH 19001909
    CSKH 19001909 Thứ Bảy, 05 tháng 11, 2022

    code này còn dùng được k e?

Add Comment
comment url
Tăng traffic miễn phí