Skip to content

Upload folder into google drive folder using PHP . #167309

Discussion options

You must be logged in to vote

Okay, so you want to upload a whole folder to Google Drive using PHP, right? The thing is Google Drive's API doesn't actually have a single way to upload an entire folder with all its subfolders and files in one go. Instead, you'll need to write a PHP script that basically mimics what you'd do manually it'll have to go through your local folder, create each subfolder one by one on Google Drive, grab the ID of that new online folder, and then upload all the files into their correct new homes recursively repeating this for every nested folder, It's a bit of a manual process in code, but totally doable by breaking it down into those steps. This post might help you get started with the basics…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by firloming
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
4 participants