RESTXQ and posting files

Friday, 20 November 2020 · 3 messages · last reply 25 Nov 2020
C
celano20 Nov 2020 03:10 #
Hi, I have a script which takes a path to an xml or txt file as an input and outputs its content (as xml or txt) after a few modifications have been applied. I would like to make the script available as a RESTXQ application, but it is not clear to me how I can specify, in a RESTXQ function, that an xml or txt file should be accepted as an input. I have been able to post by sending the content of an entire file as a string, but I guess there is a specific way to handle files. Ciao, Giuseppe
N
Nicholas21 Nov 2020 09:31 #
if you were to put your efforts on github, I'd certainly be interested.
Quoted text · celano at informatik.uni-leipzig.de · 16 lines
On 11/19/20 6:10 PM, celano at informatik.uni-leipzig.de wrote: > Hi, > > I have a script which takes a path to an xml or txt file as an input > and outputs its content (as xml or txt) after a few modifications have > been applied. > > I would like to make the script available as a RESTXQ application, but > it is not clear to me how I can specify, in a RESTXQ function, that an > xml or txt file should be accepted as an input. I have been able to > post by sending the content of an entire file as a string, but I guess > there is a specific way to handle files. > > Ciao, > Giuseppe >
CG
Christian Grünin reply to celano, 20 Nov 2020, 03:1025 Nov 2020 12:56 #
Hi Giuseppe,
Quoted text · celano · 3 lines
> I would like to make the script available as a RESTXQ application, but > it is not clear to me how I can specify, in a RESTXQ function, that an > xml or txt file should be accepted as an input.
What have you tried so far? Are you planning to upload your file as binary stream (e.g. via curl), or do you want to provide an HTML form? Best, Christian

⚡Generated with XQuery