Search code examples
androidgoogle-drive-apigoogle-drive-android-api

How to upload files to particular folder in Google Drive Android


i am not having issue in uploading files to root folder of google drive i am not able able to find the way to upload the files in specific folder in google drive

i followed this example by google developer here is the link


Solution

  • The link you specified pertains to Working with Folders and focuses pretty much on discussing the root folder (creating folders, creating files inside folders etc.). I've looked around the community and found this post that is pretty much the same as yours.

    First is a post on how to post photos on a specific folder, the answer is pretty much the whole guide on how to do it. Basically, it mentions "What you need to do in order to upload a file to a specific folder is to add the folder's id to the file parents"

    I think all you have to do now is to tweak around the code according to your preference (with the data type and all).