I have a (simple) REST process which required a file parameter (datatype = File). When I try this call in Postman, I get a 400 error (bad request), see below and how the process parameter is set in the REST process:
I consulted with the mastermind behind the Rest plugin, @m.gechev. Currently, it is not possible to POST a file directly to Novulo. If this functionality is required, please create a Novulo Service Request (SR).
In other applications, we use base64 strings to upload files. Your parameters for the process will look like this:
Within the architect process, you can create a file from this base64 string using the FileExtensions plugin’s FileFromBase64Action process. This process will return the file that you can use for the import.
Thanks Aimee, I think we can make it work with the proposed solution, but IMO it’s not a real solution, because it’s a ‘standard’ functionality in REST calls. I’ll create a SR for this!
@David this functionality is currently available in the newer versions of the Restful plugin.
The description used in the corresponding PI is as follows: What has changed: REST endpoints now supports multipart/form-data content-type requests that allows sending form data (be it actual form, json etc) and binary files in the same request. Who is impacted: Configurable endpoints users What needs to be configured: Nothing How to use it:
1)Create a process that accepts multiple values + one of the parameters is of File type.
2)Implement this in a REST Process endpoint.
3)Do a HTTP request with content-type multipart/form-data with the needed parameters, also ensuring the file is attached
On success - the file is completely accessible from within the Novulo application