divelogs.de: parsing response on upload

Sergey Starosek sergey.starosek at gmail.com
Mon Dec 9 04:18:44 UTC 2013


On Mon, Dec 09, 2013 at 01:24:22AM +0200, Lubomir I. Ivanov wrote:
> i can't seem to solve the upload issue.
> everything looks right yet the website seems to return the
> "<FileCopy>failed</FileCopy>"
> the local created archive is readable by both libzip and other external tools.
> ...and we add this same file in the multipart for upload.

Seems I've managed to solve this issue:

while building file part of multipart you have to have filename

setRawHeader("Content-Disposition", "form-data; name=\"userfile\"; filename=\"/tmp/test.DLD\"");

Not sure whether it should be unique between sequential uploads.

Today I've cloned your 'web' branch and it segfaulted at
zip_open_wrapped(). You can't dup FD until QFile is openned. Also libzip
documentation states that

"using zip_fdopen the archive can only be opened in read-only mode"

Hope this helps,

More information about the subsurface mailing list