Upload Files To Cloud Storage


Is there a way to take files from my computer (image, video, audio) and upload to some cloud storage account like google drive or pcloud, mega?

Last edited on
Yes, but the exact details of how to do it are going to vary based on the cloud storage provider. In some cases, where you don't need to use an account, it's as simple as sending an HTTP POST message (which you could do through libcurl). I imagine for the stated cloud storage providers, it's going to bit more involved depending on how they want you to authenticate with them.

-Albatross
I have an account on dropbox, google drive, pcloud, (all of them I use daily)
Any idea on how can I upload to any of them?
Last edited on
some of these can be mounted as a drive locally and just directly written to, I think. It may take some hackery to get there, but its doable. I had dropbox doing that at one point.

otherwise you need to do what was already said, and find an API or SDK to get it done.
To be clear, you're looking for a C++ solution to this, right? Most consumer cloud storage providers have an app of some sort.

Otherwise, I know there's a C++ library for uploading to Dropbox, but I couldn't tell you if it's actually any good: https://github.com/rahuliyer/dropbox-cpp
I'd say they have an official SDK, but... well... they don't for C/C++: https://github.com/dropbox?q=sdk

Otherwise otherwise, Dropbox does have a fully-documented Web API that you could probably use via libcurl. https://www.dropbox.com/developers/documentation/http/documentation

The same goes for pcloud, except pcloud actually has a C API: https://docs.pcloud.com/sdks/c.html

Good luck. This sort of stuff may be a bit advanced for a beginner.

-Albatross
Last edited on
Thank you Albatross,

I have that c++ library and as I couldn't find a tutorial on how to use I am trying to understand the codes and get it to work and see if it is good or not

yeah I was in a dropboxforum and learned that there is not current an official SDK https://www.dropboxforum.com/t5/API-Support-Feedback/Upload-a-file-using-c-via-curl/td-p/360023

I have been trying to upload a file to dropbox using culr but all that it does is just create new files and folders and I am still waiting for a solution response in the link above

I will check out pcloud c api and see what can it do

As a note, I have found a mega official sdk here https://github.com/meganz/sdk, but like every other api that I might find don't know how to use them yet, and haven't yet found a c++ code example using mega c++ sdk

Last edited on
Topic archived. No new replies allowed.