Hello all,
What I'd like to accomplish is to simply upload a file (zip) to a bucket that I've already created on Google Cloud Storage.
REST API URI is given as:
https://www.googleapis.com/upload/storage/v1/b/[BUCKET_NAME]/o?uploadType=media&name=[OBJECT_NAME]
I do understand that I need oauth2 to access the API and I'll need to use oauth2 library:
The part I'm trying to figure out is do I use:
-j.download2 OR
-j.postfile
In either case, what would be the proper full command to upload the file to my bucket? Where do I fill in access_token if I need to use postfile command?
Thanks a lot!
Ferit
What I'd like to accomplish is to simply upload a file (zip) to a bucket that I've already created on Google Cloud Storage.
REST API URI is given as:
https://www.googleapis.com/upload/storage/v1/b/[BUCKET_NAME]/o?uploadType=media&name=[OBJECT_NAME]
I do understand that I need oauth2 to access the API and I'll need to use oauth2 library:
B4X:
oauth2.GetAccessToken
Wait For OAuth2_AccessTokenAvailable (Success As Boolean, Token As String)
If Success = False Then
ToastMessageShow("Error accessing account.", True)
Return
End If
Dim j As HttpJob
j.Initialize("", Me)
The part I'm trying to figure out is do I use:
-j.download2 OR
-j.postfile
In either case, what would be the proper full command to upload the file to my bucket? Where do I fill in access_token if I need to use postfile command?
Thanks a lot!
Ferit