使用Google Drive PHP API上传文件夹

I want to upload a folder of files to Google Drive, using the PHP API. I can upload a single file to my Google Drive, but can't seem to upload a folder of files...e.g. a folder containing some Word documents and PDFs. Does anyone know if this is possible?

Files: insert Insert A new file

In instances like this the documentation can be a big help. File.insert is for inserting A file as in one singular. If you want to insert more then one I suggest you look into using a loop and looping over each of the file you would like to upload.

Tip:

setting the mime type as follows creates the initial folder

mimeType = 'application/vnd.google-apps.folder'

Note the file id when that is created and set the parent of the files up upload to that and they will be uploaded into that directory.