Closed jrlanders closed 7 years ago
@jrlanders Thanks so much for using my library.
At this time, RestEssentials does NOT support multipart file uploads. RestEssentials deals with JSON data types only. If you can change the server, the way you can do it is to have the server accept JSON that looks like:
{
"fileName": "someFile.png",
"fileData": "base64EncodedStringOfFile"
}
If you cannot change the server, then there are a few options...
Thanks again!
@jrlanders I am going to close this issue since you resolved it. If you do not plan on updating the library for file uploads, then please open an issue requesting that feature.
Thanks again.
Hi Sean, The new version remove the put Error I was getting. I am trying to use the Put method to send a file. The interface is for a project called Agiloft. The rest method I am using requires, "Attaches the file passed in the body of the request to the specified field of the record identified by the supplied primary key." I am still trying to figure out how to upload it that what. It is a PDF file and I don't see to understand it yet. The Agiloft indicates that if it were an HTML for it should look like this: \ Characters removed to display ` form method="post" action="https://xxxxxxxx.com/ewws/EWAttach" enctype="multipart/form-data"> input name="$KB" value="Demo" /> input name="$table" value="case" /> input name="$lang" value="en" /> input name="$login" value="admin" /> input name="$password" value="qwerty" /> input type="file" name="inbound_attachments"/>** input type="submit" value="submit" /> /form> `
The error mentioned int he subject line is happening when I try and do a GET. I was not having that issue before the new release. CORRECTION I have resolved the issue mentioned in the subject line but and still working on the file upload issue.
Any Thoughts?
Thanks for all your hard work on this project!