divelogs.de: parsing response on upload

Lubomir I. Ivanov neolit123 at gmail.com
Sun Dec 8 15:24:22 UTC 2013


On 7 December 2013 19:56, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> On 7 December 2013 19:22, Rainer Mohr <mail at divelogs.de> wrote:
>> Gentlemen,
>>
>> Am 07.12.13 16:35, schrieb Dirk Hohndel:
>>
>> and the transfer is reported as successful, but then this is the
>> server response:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <divelogsDataImport version="1.0">
>>   <Login>succeeded</Login>
>>   <FileCopy>failed</FileCopy> <---------------- ?
>>   <entered>0</entered>
>>   <skipped>0</skipped>
>>   <profiles>0</profiles>
>> </divelogsDataImport>
>>
>> and the uploaded dive is missing in the web interface.
>> any ideas?
>>
>>
>> FileCopy failed is the response you get when no DLD File has been POSTed to
>> the API. Ist the fieldname of the POSTed File "userfile"?
>> So to me it looks like there was no file transmitted.
>>
>
> hello,
> yes it is.
>
> and a byte stream definitely reaches the Qt method here:
> https://github.com/neolit123/subsurface/blob/web/qt-ui/subsurfacewebservices.cpp#L576
>
> i've also tried:
> - re-arranging the parts to be "user", "pass", "userfile", as they are
> "userfile", "user", "pass" currently
> - using QHttpPart::setBody() instead of QHttpPart::setBodyDevice()
> but that does not seem to help.
>
> i'm adding a CC to thiago to see if he has an idea why this happens.
>

bump for this one!
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.

BTW, i would appreciate including some of these changes in master,
because i'm getting merge conflicts.
e.g. the correct "process dives" code for the download was already in
my branch but not in master and then at one point there were some
changes for that.

lubomir
--


More information about the subsurface mailing list