![]() When your script is modified, it becomes as follows. ![]() When this is reflected to gapi, please add alt: "media" to the request object. In order to download a file using the method of files.get in Drive API, please use alt=media for the query parameter.If my understanding is correct, how about this modification? Modification point: You want to achieve this using gapi with JavaScript.In this case, the file is not Google Docs. You are using the method of files.get in Drive API.You have the permission for downloading the file.Your access token can be used for downloading the file.You want to download a file from Drive API. ![]() Xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken) Īm I missing anything? Is it the right approach to download a file from Drive in the client side? As per the file:get API Documentation, I'm using the below code to get the file var request = .get( callback Function to call when the request is complete. I'm trying to integrate the Google Drive in my angular application So that our users can copy the content from docs and download their images to my application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |