I want to use the mayan-api_client to upload documents( to automate file 
uploads from a windows machine ) 
On a Linux machine it works as expected but on a Windows machine ( Win 7, 
Mayan on Ubuntu 16.04) it doesn't upload PDFs. 
I'm using this command: 

api = API(host='http://192.168.1.6', username='admin', password='something')
with open('c:\Users\User\Documents\test.pdf') as file_object:
    response = api.documents.documents.post({'document_type': 2}, 
files={'file': file_object})

All other file types are working, except PDF. The file is corrupted on the 
server - only a few bytes are there, therefor it cannot be proceeded and it 
gives me this error:

converter.backends.python <12314> [ERROR] "get_page_count() Exception 
determining PDF page count; Unexpected EOF".

I have no problems to upload the same file using the web interface.

It seems there is a problem with the file transfer to the server. But why 
only PDFs?

Any ideas where the problem could be?



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to