Forum Discussion
Hi @mbowen,
Thank you for the response. You have specified the files in rest post snap. It is easy to specify the files in rest post snap, if we know the number of files and their content-types in advance.
But in my case, I don’t have a clue about number of files I receive and their content types. The file number vary from 1 to 10 and their content type also varies. Could you please help me with the request?
Tell me a little about the service(s) you’re invoking? Are they custom in-house services that you control, or external? Our REST snap pack is not a premium pack, so while it provides a fairly broad range of functionality it may be a bit rough around the edges for some use cases. What I’m getting at is that it’s not as light weight as curl, where I can see dynamically creating POST requests without too much effort.
I don’t have much experienced with form-related data, so I’m not sure if that could help here.
Representing a form field key/value as a file seems pretty heavy to me, but we’re piggybacking on the multi file upload functionality. Most of the fields in an upload file row are expression enabled, so could be supplied from either input data or pipeline parameters.
If you controlled the backend, I suppose you could pack all non file form field data into one file and then decode that in the backend. Again, not pretty, and I won’t even suggest this. It’s not obvious how to inject an upload file table into this snap.
That said, I’m often amazed at other people’s pipeline solutions. I wonder if any folks are using scripting for this – probably not for file upload, but maybe. Our Script snap supports a variety of languages (Python, JavaScript, …) with limitations though.