question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ asked ·

LMS cannot uploadFile: Format the input file so that the request file contains multiple lines

I'm having trouble with the uploadFile call in the FileTransfer API of LMS.  I'm sending a zip file via XML that has been base64 encoded by inserting the encoded string

in the <Data> field of the uploadFileRequest xml document.  The response I get from eBay is: Format the input file so that the request file contains multiple lines.

 

 

I'm not exactly sure what the problem could be, because the xml strings are generated by hand, and they're already pretty printed with plenty of extra line breaks thrown in there.  I have even tried replacing the linebreak character '\n' with '\r\n' and still get the same results. I'm well aware of the 20,000 character limit per line of the data file...but the entire document, including the request and the inserted data string are less that 20,000 to begin with...so I'm really confused as to what the problem could be.

 

Here is what the request looks like:

 

 

<?xml version="1.0" encoding="utf-8"?>

<uploadFileRequest xmlns="http://www.ebay.com/marketplace/services">

<fileAttachment>

<Size>8093</Size>

<Data>UEsDBBQAAAAAANJbiT/sEmBehRYAAIUWAAALAAAAQWRkSXRlbS54bWw8P3htbCB2ZXJzaW9uPSIx

LjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8QnVsa0RhdGFFeGNoYW5nZVJlcXVlc3RzIHhtbG5zPSJ1

c3RhcnRQcmljZT4KCQkJCTxCdXlJdE5v

uc0FjY2VwdGVkPlJldHVybnMgQWNjZXB0

 

<!--Base64 encoded data...---------------------------------------------------------------------------------------------------------->

 

ZWQ8LGFuZ2VSZXF1ZXN0cz4KCQoJCgkKCQoJClBLAQIUAxQA

AAAAANJbiT/sEmBehRYAAIUWAAALAAAAAAAAAAAAAADwgQAAAABBZGRJdGVtLnhtbFBLBQYAAAAA

AQABADkAAACuFgAAAAA=

</Data>

</fileAttachment>

<fileFormat>zip</fileFormat>

<fileReferenceId>50000922113</fileReferenceId>

<taskReferenceId>50000834483</taskReferenceId>

</uploadFileRequest>

 

 

What am I doing wrong?

By the way, the data file consists of a zip file with a single xml file inside of it that follows the merchant data api for 

constructing a bulk request of two calls to verifyadditem.

 

Also, I'm doing this all on the sandbox.

 

Thanks in advance for the help.

 

rdwrhansen

 

lms-uploadfile-error
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.