How to upload file to cloud via Rest api? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 3

How to upload file to cloud via Rest api?

Has anyone done a code that uploading file to cloud via Rest api? I tried to upload file to pcloud. But I have a hard time to understand their doc. https//:docs.pcloud.com/

14th Apr 2017, 2:49 PM
Calviղ
Calviղ - avatar
1 Antwort
+ 3
This would depend on what programming language you are using and if permissions are set to allow you to hit the API endpoint. If you know that you can access the endpoint then it's just a matter of finding some code in your preferred language to upload a file. For example, if you're using C# (my preferred language) you can write a byte array using a stream to the endpoint and save the file. For a more elegant approach you could also look at "chunking" the files using Ajax requests and send each chunk separately... this approach is generally used if sending/uploading large files and would allow you to continue an upload where it last left off if a connection kicks out. Hope this helps.
28th Apr 2017, 8:22 PM
Mike
Mike - avatar