My Products
Help
adrianm
PARTNER

Is there a size limit on attachments via API?

by adrianm

I'm bulk-uploading attachments to products.

 

Most work fine but for some where the file size is 8-10 megabyte the request never finishes (at least not in the 20minute timeout I have). The attachment is not added the product.

 

Adding the same document manually in the GUI takes ~5 seconds.

 

3 REPLIES 3

by Oskar Jansson

I can now confirm that the size limit for attachments is the same in both the API and the UI.

adrianm
PARTNER

by adrianm

Update, imported ~400 smaller attachments which worked but with many Internal Server Error (500).

 

Most common (~20):

{"ExceptionType":"java.util.concurrent.TimeoutException","ExceptionMessage":"IO Exception while copyingStreams: java.util.concurrent.TimeoutException","ExceptionFaultCode":"5520","ExceptionMessageID":"5520_f22a8e1a-1fa4-4507-b5f1-69ef3b8c0abc","ExceptionDetails":""}

 

But also a few

{"ExceptionType":"java.net.SocketException","ExceptionMessage":"Error occured while connecting to the service when trying to get response code (IOException)","ExceptionFaultCode":"5521","ExceptionMessageID":"5521_e8c21ad6-b84c-436f-b24d-f5dfc67a2d6f","ExceptionDetails":""}

 

and

 

{"message":"VismaId: 6e79f0dd-aa24-49d8-b096-39c91a3acfb4. A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"}

 

I have used the same code earlier to import thousands of attachments on supplier invoices without problems.

Has the implementation of attachments in the api changed (like now using java :-))

by Oskar Jansson

Hi Adrian, thank you for your question. I'm currently looking into the size limit for attachments.

 

My initial thought is that 8-10 megabytes should not be a problem, so there might be an issue with the API. There was an API problem last week that has now been resolved, and I want to ensure that these two issues are not related. 

Do you still get the 20-minute timeout when you try uploading the same file today? And do you still get the same 500-errors?