How to save to remote over http?

Hi all,

I would like to save remotely (ideally streaming for larger tuples) over http.
As starter, I tried to save a histogram as png

outURL = gSystem->Getenv("OUTURL")

outURL = https://my.http.endpoint:2880/path/to/write/out.png?authz=MDA0Y...

which failed with
Error in <TPostScript::Text>: Cannot open temporary file: https://my.http.endpoint:2880/path/to/write/out.png?authz=MDA0Y...

Since uploading the files manually with davix works, I suppose that the principle http handling should work. But I am not sure from the error message, if I can avoid temporary files but stream directly to remote (in case can I set a temporary local path in addition to the actual remote output path)?
Since in the URL I am appending query arguments to the actual file path, I guess simply deducing the file format from the file name would not work but I would have to give the target format explicitly somehow?

Maybe somebody has already some experiences with that?

Cheers and thanks for ideas,

_ROOT Version: 6-18-00
_Platform: Fedora 29

Well, AFAIK, you can’t write a file to the web via http…

you need control of the remote server and write an end point that understand your request.
usually this means writing an end-point that expects a file-upload POST request (via a form).


(I can direct you to a tutorial to do this in Go if you will)

Hi Sebastien and Bertrand,

the end point works, i.e., a PUT with curl on the URL works without a problem.
Since also davix-put works with the URL, I hoped that ROOT with libdavix could write out-of-the-box as well onto the URL.

So maybe @pcanal knows if there is a way using the Davix interface…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.