When I tried this usecase for some MIME types the content is coming in payload.parts[0].content, for some MIME types the content is coming in payload.parts.file.content. How to create the file in the same MIME type as how we received from postman in SFTP?
How to accept any multipart file (image/pdf/csv) from postman and create the same file into SFTP location in Mule 4?
684 Views Asked by Zakira Nafeesa At
1
There are 1 best solutions below
Related Questions in MULE
- What is the relation of numberOfConcurrentTransactedReceivers with the number of threads mule spawns
- Mule 3.6 Custom Java Class
- How can I access Mule ESB Community edition via browser?
- Mule ESB Community Standalone Runtime
- Invalid Keystore Format when trying to deploy Mule project
- Custom Converter with log4j2 and Mule not working
- Getting Error While Using HTTP on Mule ESB canvas
- Which mule transports does the re-connection strategy work with
- When does the VM transport actually persist messages ? and also a peek into HA and VM transport
- Can I read or update dynamically the multiple Mule app properties without reloading or restarting?
- Mule: Migrating to the New HTTP Connector
- Where can I download MuleSoft Community Edition?
- Revoking OAuth tokens in Mule
- LDAP Search json output
- Basic JSON formatting using Mule Expression Language
Related Questions in ANYPOINT-STUDIO
- How to map CSV fields to a JSON list?
- Failed on parsing and getting query metadata error on Salesforce Order query
- How to stop asynchronous flow in mule
- How to specify the relative path for the File inbound connector in Mule
- How to update Mongodb documents in Mule?
- Convert ByteArraySeekableStream back to JSON in Mule
- Unable to resolve raml file errors
- Json schema exception no protocol error when creating a metadata type in Mule using a Json schema
- How do I build up a payload in Mule?
- Join mongodb collections in Mule
- Issue with property place holder
- Loading a Java class just only once during Mule flow initialization
- CSV metadata types disappear in Anypoint Studio
- Mule copies Maven dependencies into env.M2_REPO folder
- RAML file is throwing invalid Json schema response in Anypoint Studio
Related Questions in MULE4
- How to accept any multipart file (image/pdf/csv) from postman and create the same file into SFTP location in Mule 4?
- Mule4 studio error Cannot delete existing folder
- How to access lookup object value using Salesforce composite connector "Create sobject tree" in Mule 4
- Zip key and value arrays into one object with Dataweave
- Dataweave Append in Transform
- Mule 4 : Database : How to pass a SQL query as a variable in database "Query Text"?
- MULE 4 : Batch Process : How does the batch process component process records in a collection?
- Reading yaml properties file from S3
- MULE 4 : REDUCE method : Is there a limit to elements size in Reduce method if the accumulator is an Object?
- In Mulesoft Api development, to integrate any application with salesforce do we need to use salesforce connector or http request?
- Mule 4 : For Each : org.mule.runtime.api.metadata.TypedValue cannot be cast to java.util.Map
- How to write a Munit test case for an integration that is using a common HTTP request connector for calling 5 different resources of the system layer?
- Issue concatenating error.detailsDescription with any string in mule 4
- Mule 4 : Questions related to Mule 4 project structure and Anypoint Studio
- Mule 4 : Can Mule 4 Domain Project be used as a Maven Parent Project for other mule apps?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Quite not sure in what ways you have used and tested the both expression. Please find the screenshot below. I have added different format of datas in single request. If you use mutiple format in single request and wanting to extract individually. Use
payload.parts[0].contentandpayload.parts[1].contentNote: This expression ideally mean whatever you add (form-data) in postman body request can be extract using index. Example: if you have added content-type: application/xml in the below picture 3rd row, should be using
payload.parts[2].contentIf you're using single request
payload.parts.file.contentcan be used.Once after the request reached
HTTP/HTTPS( source listener), use dataweave as below to convert binary in to the defined structure dataAfter extracting the contents using the expressions, you can write in to SFTP (Screenshot) here I have stored in
Vars(based on your logic)