is it possible to upload files not from drive with script?

79 views
Skip to first unread message

Procesos ABP

unread,
Dec 9, 2019, 2:20:32 PM12/9/19
to Google Apps Script Community
Just as the question asks. I'm trying to do an application mainly in sheets and i want to be able to upload a file to drive from my sheet, so that there is a button and when i click it i get a select file dialog so i can upload to drive and store the ID in my sheet. i have the google picker working, but it makes a bit pointless the app since they first have to upload it to their own drive to be able to select it.

Thanks!

Riël Notermans

unread,
Dec 9, 2019, 6:24:04 PM12/9/19
to Google Apps Script Community
You can set the docsUploadView to pickerbuilder:
 Create  a view:
 var uploadView = new google.picker.DocsUploadView().setIncludeFolders(true);
 
 set this view:
var picker = new google.picker.PickerBuilder()
                .addView(uploadView)
....other picker config.



On Mon, Dec 9, 2019 at 8:20 PM Procesos ABP <proces...@gmail.com> wrote:
Just as the question asks. I'm trying to do an application mainly in sheets and i want to be able to upload a file to drive from my sheet, so that there is a button and when i click it i get a select file dialog so i can upload to drive and store the ID in my sheet. i have the google picker working, but it makes a bit pointless the app since they first have to upload it to their own drive to be able to select it.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/7ba70214-5db2-416c-a1de-e8373f9fbd7b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages