Share Google Drive Folder with Others for Uploading Files: GAS096

Introduction

In this project, you'll develop a system in Google Sheets that enables you to share a file upload link. This link allows other users to upload files directly to your Google Drive folders from their side. You have the flexibility to set limits on the file size to be uploaded and specify an expiration date for the link. Additionally, you can create a password to provide an extra layer of protection for the link. This project is an excellent opportunity to enhance your Google Apps Script skills, as it incorporates various APIs such as Web App, Google Drive API, Google Sheets API, and Gmail API.

YouTube

If you're a visual learner and prefer watching video instructions, I highly recommend checking out this video.

Instructions (6 Steps)

To establish your own project, adhere to the following steps:

Step 1

Utilizing the provided link, you can create a duplicate of my project on your Google Drive.

Make a copy

Step 2

To fulfill the authorization requirement, navigate to the copied Google Sheets document and select the “Open” button located within the custom menu “Folder Sharing”.

* Check the authorization guide if unfamiliar with the process.

A Complete Guide to Authorize GAS Project

Step 3

After the authorization, you will need to deploy the project as a web app for the file upload links. By going to the menu in the Google Sheets “Extensions > Apps Script” to open the Apps Script editor to complete the deployment.

* Check the deploy guide if you are unfamiliar with the process.

A Complete Guide to Deploy GAS as Web App

Step 4

In step 3, you will obtain the URL for your web app. Now, in the file "app.gs", locate line 4 and replace my URL with yours. After making these changes, save them and deploy them again to use the most recent code with your updated URL.

Step 5

In the Google Sheets, navigate to the tab labeled "Folders." Within this tab, input the IDs or URLs of the specific folders stored on your Google Drive that you wish to share.

Step 6

Now that you have a Google Drive folder, you can easily share it with others. Head over to the "Folder Sharing" custom menu to access the dialog box that allows you to generate and send a shareable link.

Folder to Share - Choose the folder you would like to share with others.

Email to - To share with someone, input their email address.

Expired in Days - At what point the link’s validity should expire.

Size Limit in MB - The maximum file size that a user is permitted to upload in a single operation.

Times of Uploads Allowed -Maximum number of uploads permitted per user.

Password - To upload files, the user must provide their password.

An email containing a file upload link will be sent to the email address you provided. The body of the email will include all the necessary details regarding the file upload process.

Upon clicking the link provided in the email, the user gains the ability to upload files directly from their device to the shared folder you have designated.

Other Features

  • To understand my code, open the Apps Script editor. To do this, navigate to "Extensions" in the menu bar, and then select "Apps Script."
  • Without the need for email, you can create a link and locate it in the "Sharing Links" section. This link can be copied and shared with others at your convenience.

GoogleAppsScript Playlist (Subscribe for New Projects)

Links

Hire me on Upwork  Donate (PayPal) YouTube Github Twitter / X Instagram 

Comments