-1

Here's the challange: I want to create a structure of folders in my drive when I begin a new proyect, I want to do it using JS (what according to google is possible), but when I try to see the instructions I get lost. I've already got my client ID and my API Key. I could also to authenticate and see my drive structure, but I can't find the code for creating the folders ¿Could someone please help me on this? Thanks on advance...

0

2 Answers 2

0

You need to use create file endpoint like it is written in this page: https://developers.google.com/drive/api/v3/folder#create_a_folder

Sign up to request clarification or add additional context in comments.

6 Comments

I have used the code listed in this link. To refer to the drive object I replaced "drive.files.create" with "gapi.client.drive.files.create" to solve the problem "drive is not defined" but then, I don't receive any log message, nor success nor error...
@FernandoDePalmaMadrid, please update your question with actual code you've written and errors you've got
Here's the complete code. All the processes work fine (Login, list of folders), but the "create" option doesn't work. It does not send anything to the log console. drive.google.com/open?id=1EdJgAPBt-sc9Li6ui_Pmvss32tf1FMqD
@FernandoDePalmaMadrid, paste function you use to creating folders to your question (you can edit it). It will be better formatted than plain text. Read also that topic: stackoverflow.com/help/how-to-ask
The code (just for the function itself) is 133 longer than permited...
|
0

Finally I found the solution in another post: https://stackoverflow.com/a/44527113/11971139

Thanks to Uri and all the people around here that adds (not the others :)!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.