Page 1 of 1

hURL WebDAV Upload doesn´t work

Posted: Tue Mar 08, 2022 8:32 am
by fingus
While Download from my WebDAV-Resource is working with this:
DownloadFile("https://user:password@mydomain.org:5006 ... lammer.jpg", {file = "Karl_Klammer.jpg", SSL = True, Adapter = "hurl"})
Upload doesn´t:
UploadFile("https://user:password@mydomain.org:5006 ... r/test.jpg", {file = "test.jpg", SSL = True, Adapter = "hurl"})

Re: hURL WebDAV Upload doesn´t work

Posted: Fri Mar 11, 2022 11:39 am
by fingus
With this example-code taken from this Forum its working:
Function p_ReadFunc(len)

If rlen + len > flen Then len = flen - rlen

If len > 0
rlen = rlen + len
Return(ReadBytes(1, len))
Else
Return("")
EndIf

EndFunction

usr$ = StringRequest("", "User?")
pwd$ = StringRequest("", "Password?")
f$ = FileRequest("Select file")

OpenFile(1, f$)
flen = FileLength(1)

e = hurl.Easy({url = "https://mydomain.org:5006/path/to/pictures/" .. FilePart(f$), username = usr$, password = pwd$, ReadFunction = p_ReadFunc, upload = 1, infilesize = flen})
e:perform()
e:close()
CloseFile(1)

Re: hURL WebDAV Upload doesn´t work

Posted: Fri Mar 18, 2022 7:56 pm
by airsoftsoftwair
Hmm, I'd need an MCVE to debug this but it's probably difficult because your WebDAV server is private, isn't it?

Re: hURL WebDAV Upload doesn´t work

Posted: Fri Mar 18, 2022 9:40 pm
by fingus
airsoftsoftwair wrote: Fri Mar 18, 2022 7:56 pm Hmm, I'd need an MCVE to debug this but it's probably difficult because your WebDAV server is private, isn't it?
E-Mail send!

Re: hURL WebDAV Upload doesn´t work

Posted: Fri Jun 17, 2022 9:20 pm
by airsoftsoftwair
As described in my mail from April 16th, I can't reproduce the problem so it was probably caused by an older hURL version that you had installed.