You can do this with a triggered task, but need to make sure there is only a binary view open, otherwise it will fail with the error:
Document input views only accept JSON-encoded data
SnapLogic has two types of input views: document and binary. The document input views are used for structured or semi-structured data like Json, XML, CSV, etc. Document input views are represented by a Snap with an open circle like this.
For your use case, the request will be multipart-form-data and so the pipeline should have a binary input view. Specifically you should use a Multipart Reader that will be able to extract the binary data from the POST request. The binary input view is an open diamond.
Here’s an example of a Pipeline that takes the POSTed file and stores it in SLFS using the Multipart Reader and the File Writer. You can try it out by importing this pipeline, creating a triggered task, and then using Postman/curl to send a file to the task endpoint. You should see the file you sent written to a file named ‘attachment.txt’ in the same project as the pipeline.
post-file-example_2019_10_04.slp (4.3 KB)