1
votes

I am writing an Apps Script in Google Sites (sites.google.com) and I need the script to copy a file from my local hard drive (or a server file share) to a Google Sited Folder. Can I do this? Is there some sample code? I am basically trying to do what is described here in Section 1 (Linking Google Drive Folders with Sites File Cabinet):

https://developers.google.com/apps-script/articles/embedding_docslist_in_sites

But I dont want to copy from my Google Drive to a Google Sites folder but rather my local hard drive or file server to a Google Sites Folder.

Thanks, Todd

2

2 Answers

1
votes

You have to write an UI to that allows the visitor to the site to upload the file. See https://developers.google.com/apps-script/reference/ui/file-upload for an example.

0
votes

i know this is an older post but, i couldn't see the right answer.

Im using an additional software called "DROPIT" with "Google Drive PC Software".

So, the soft of G.Drive helps you to manage your Google Drive account in a local manner, allowing you to simply drag and drop documents from your local Hard Drive to your G. Drive account, always keeping it logged and running when Windows Starts.

By the other hand, use DropIT Software to automate whatever you want to do. (eg. move all JPG extension files from a local folder to another using. Read more about the software its very customizable and usefull.