how to upload images taken from QTapp to Cloud Server
-
Hi All,
i am usuing the QCamera module and capturing a picture and saving the picture onto my local system, is there a way where i can capture the picture and save the image onto a cloud server like (google drive), how to i call for google drive api from QT application?
Thanks!
-
@vinaygopal On which platform?
-
@jsulm sorry for the late reply, i am trying to implement this on a desktop, i am able to take a picture using the camera and also able to store it on to my local desktop is there a way i can take access to my google drive stroge server and upload the image directly to the server? i was going through this blog (https://www.qt.io/blog/2017/01/25/connecting-qt-application-google-services-using-oauth-2-0) and in my case what would be my scope for example in the blog it says (google->setScope("email");) as they are trying to access user emails. i am trying to access cloud storage. can you please guide me through the process
Thank you.
-
@vinaygopal Is your Google storage mounted as a drive? If so you can access it as any other drive. If not then you probably will need to use Google API for uploading.
-
@vinaygopal said in how to upload images taken from QTapp to Cloud Server:
can you please give me an example about how i can use the google drive API
No I can't as I never used it.
But if you enter "google drive stroge api" in Google first match is https://cloud.google.com/storage/docs/json_api/v1/
This is the JSON API, on the left side there are other APIs. -
@vinaygopal said in how to upload images taken from QTapp to Cloud Server:
how to use any API in QT?
Qt is a C++ framework, so you use other API as you do in C++.
Please take a look at Google documentation and examples (if there are any). -
You can use QNetworkAccessManager upload the contents to the GoogleDrive. Also you need to setup the GoogleDrive for accessing like web-server.