hURL WebDAV Upload doesn´t work

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

hURL WebDAV Upload doesn´t work

Post 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"})
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: hURL WebDAV Upload doesn´t work

Post 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)
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: hURL WebDAV Upload doesn´t work

Post 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?
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: hURL WebDAV Upload doesn´t work

Post 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!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: hURL WebDAV Upload doesn´t work

Post 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.
Post Reply