I am using Quickstart: Run a Drive app in JavaScript tutorial to upload documents to google drive. I am successfully able to run the HTML file and upload the document.
For example I uploaded a test.docx file and the JSON response is at the end of the post
The question is, the alternate link opens up the doc in view only(pdf like) mode. For this example here is the link https://docs.google.com/a/easytha.com/file/d/0B7x-2AmDcIyRN3hPVVRWSUhQaWs/edit
but how do I build a URL so that it opens up in edit mode like this https://docs.google.com/a/easytha.com/document/d/1rH79lwfX4bZ4R5EEhSaTy52dfdKiezNOaaR-6ORBcoI/edit
And both of these are the same documents.
alternateLink
"https://docs.google.com...hQaWs/edit?usp=drivesdk"
appDataContents
false
copyable
true
createdDate
"2014-01-31T10:01:31.092Z"
downloadUrl
"https://doc-00-10-docs....4259&e=download&gd=true"
editable
true
etag
""GJcqFgACxaboeo6aKKeP6-mh0PE/MTM5MTE2MjQ5MDg1NQ""
fileExtension
"docx"
fileSize
"12497"
iconLink
"https://ssl.gstatic.com...s/icon_10_word_list.png"
id
"0B7x-2AmDcIyRN3hPVVRWSUhQaWs"
kind
"drive#file"
labels
Object { starred=false, hidden=false, trashed=false, more...}
lastModifyingUser
Object { kind="drive#user", displayName="sapan parikh", isAuthenticatedUser=true, more...}
lastModifyingUserName
"sapan parikh"
lastViewedByMeDate
"2014-01-31T10:01:30.855Z"
md5Checksum
"0acf21000754601319600c5182d794d4"
mimeType
"application/vnd.openxml...rdprocessingml.document"
modifiedByMeDate
"2014-01-31T10:01:30.855Z"
modifiedDate
"2014-01-31T10:01:30.855Z"
originalFilename
"test.docx"
ownerNames
["sapan parikh"]
owners
[Object { kind="drive#user", displayName="sapan parikh", isAuthenticatedUser=true, more...}]
parents
[Object { kind="drive#parentReference", id="0ALx-2AmDcIyRUk9PVA", selfLink="https://content.googlea...nts/0ALx-2AmDcIyRUk9PVA", more...}]
quotaBytesUsed
"12497"
selfLink
"https://content.googlea...2AmDcIyRN3hPVVRWSUhQaWs"
shared
false
title
"test.docx"
userPermission
Object { kind="drive#permission", etag=""GJcqFgACxaboeo6aKKeP6-...XMO0VKCtlQA-JDZdgem3VQ"", id="me", more...}
webContentLink
"https://docs.google.com...SUhQaWs&export=download"
writersCanShare
true