I'm trying to build a service into my website to allow uploads to be saved to owncloud and then displayed. As per this: Uploading files to an ownCloud server programatically I was able to setup postman to upload files and successfully save to serve. Now how do I display those files or do a getrequest to display an image on my website?
Asked
Active
Viewed 300 times
0
-
You'd also need to either share that image with a link in a programmatic manner or you have to proxy the image via your http server to keep the credentials secret and handle session management. All in all owncloud is a horrible tool for this task. Sorry. – arkascha May 02 '17 at 07:52
1 Answers
0
I found the get command. You need to make sure you have the authorization header as in postman for example. You could do a get call
<baseurl>/owncloud/remote.php/<user>/<folder>/<pathtofile>
if you click on authorization select normal then put in your credentials it will generate a token key for you, this should be a separate call itself to generate a unique one each time.
You can also create folders to upload to using the MKCOL request. I had to export my postman and edit the export to have the MKCOL request b/c they are not built in.
<baseurl>/owncloud/remote.php/<user>/<foldertocreate>

lastlink
- 1,505
- 2
- 19
- 29