05-05-2024 09:36 AM
Send multiple files from multiple file writer snaps to http client snap for a POST rest api call using multipart/form-data.
The files generated by file writer snaps have timestamp in their names which will vary for each run. These files are being written to sldb. I want to pick these files from sldb and pass to http client post for api call.
If I use multipart type as files and try to pass an expression to read files from sldb path, it does not work. I have tried with type text as well. However if I select type as text and then directly select value from sldb instead of expression it works. But I can't predict the filename due to timestamp in filenames.
How to achieve that?
Solved! Go to Solution.
05-07-2024 12:38 AM - edited 05-07-2024 12:39 AM
@GitanjaliWhen enabling expressions for multipart-form, make sure to prefix the file path with 'sldb:///' when attempting to read the file from the SLDB. I have attached a basic example that utilises the Beeceptor mock HTTP service. For more detailed information, please refer the snap documentation link https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/2614591489/HTTP+Client
05-07-2024 12:38 AM - edited 05-07-2024 12:39 AM
@GitanjaliWhen enabling expressions for multipart-form, make sure to prefix the file path with 'sldb:///' when attempting to read the file from the SLDB. I have attached a basic example that utilises the Beeceptor mock HTTP service. For more detailed information, please refer the snap documentation link https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/2614591489/HTTP+Client
05-07-2024 01:37 AM - edited 05-07-2024 01:44 AM
Hi @svatada ,
Thank you for addressing my query.
I tried the way you suggested. I have progressed one step further.