Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any example how to upload file via API? #91

Open
bartwind opened this issue Jul 5, 2015 · 1 comment
Open

Any example how to upload file via API? #91

bartwind opened this issue Jul 5, 2015 · 1 comment

Comments

@bartwind
Copy link

bartwind commented Jul 5, 2015

Hi,
are upload file type field by API working??

$fileb64 = base64_encode(file_get_contents('test.pdf'));

$result = $client->call($sessionId, 'document.add', array(
'document' => array(
'document_name' => 'test api document file',
'name_doc' => 'title of doc',
'file' => array(
'name' => 'testpdf.pdf',
'content' => $fileb64,
'mime' => 'application/pdf'
)
)
));

@tzyganu
Copy link
Owner

tzyganu commented Jul 9, 2015

@bartoss77 Unfortunately the generated APi does not allow file uploads yet. It treats the file fields as simple text fields.
I will try to make the upload possible in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants