
In this Laravel PHP tutorial, I will tell you how to upload file on Google drive using Google drive API. Laravel PHP Create Folder and Upload file to google drive with access token Hear we will give you detail about Laravel PHP Create Folder and Upload file to google drive with access tokenAnd how to use it also give you demo for it if it is necessary. In this post we will give you information about Laravel PHP Create Folder and Upload file to google drive with access token. Here is the tool I made to do all necessary option using the terminal itself, that you usually do on google drive's website, you can read this as a reference.Laravel PHP Create Folder and Upload file to google drive with access token This line just sends the request to the server to perform the action, where the file object contains the response of JSON format. Now file = drive_service.files().create(body=file_metadata, You can see the MIME types provided by google here for your future codes references This parent id as a parent argument and in MIME type you are telling google server to create a file of type folder in the parent id parents, where name parameter describes the name of folder. So this function takes input of parent id of your particular folder which you want to keep as parent in which you want to create another folder. 'mimeType' : 'application/'įile = drive_service.files().create(body=file_metadata, def create_folder_in_folder(folder_name,parent_folder_id): I have tried to make a python function, you can use it in the way you want. Int byteSize = bitmapUpload.getRowBytes() * bitmapUpload.getHeight() īyteBuffer byteBuffer = ByteBuffer.allocate(byteSize) īyteArrayInputStream bs = new ByteArrayInputStream(byteArray) įile file = mService.files().insert(fileMetadata, bs)Ĭom.abstract inputstreamcontent



I have tried this: String IdFolder = (String) objects Im trying with this code but doesnt working String IdFolder = (String) objects īitmap bitmapUpload = (Bitmap) objects įtParents(Collections.singletonList(new ParentReference().setId(IdFolder))) įile file = mService.files().insert(fileMetadata, bitmapUpload) I am trying to get the names of the folders in my google drive programmatically and create a folder inside folder but there is no way.īut how do I get a specific folder and create another one in it?.Programmatically, Not with an assistant.
