I'm interacting with Google drive API to upload files (doc, excel, ppt and pdf) from a resources storage online app I'm building, to the user's google drive. Once the upload is successful (all upload process happens in the background) I open a new window with the just uploaded file in "https://drive.google.com/file/d/FILE_ID", but this is just a preview screen and some users want the option to immediately open it in google docs editor, based on the file type (docs, sheets, slides, draw, etc). Right now the users are forced to open the preview screen generated by the URL I mentioned before, click the dropdown in the top and select open with Google docs.
I store all the google drive file info obtained from the drive api in a internal database.
Is there a way how I can perform this task programmatically, so doesn't require the user's extra steps to open it in Google Docs editor?
alternateLink(v2). It's a link for opening the file in a relevant Google editor or viewer. Or usingwebViewLink(v3). It's a link for opening the file in a relevant Google editor or viewer in a browser. You may check these links for reference: stackoverflow.com/questions/29573965/… and stackoverflow.com/questions/38660429/…. - abielita