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?
686 views Asked by Zakira Nafeesa At
1
There are 1 answers
Related Questions in MULE
- How to compare two dates with only month and year in mule
- remove object from complex object if specific value is null
- Get flow name from subflow
- Convert a single column values into multiple rows using dataweave
- How to dynamically convert an list of strings into key value pair using dataweave 2.0
- Using $ in a string in a dataweave expression
- Generating an Array based on a total Count and split Number
- What should be my response body in raml if i am sending hashmap as response?
- Get Object from specific Bucket on AWS S3 in Mule 4
- How do I transform the incoming JSON payload having objects to a payload having a list of the objects expected by the downstream system
- Error while deploying app in Anypoint Platform using Azure DevOps
- Querriable properties available for the MuleSoft Anypoint Platform Cloudhub application log API?
- Import Java Jar in Mulesoft Project
- h2 In memory database private mode - unable to access console
- Dataweave Transformation- How can I reduce a payload array when condition is met
Related Questions in ANYPOINT-STUDIO
- How can I effectively manage SFTP Private key files in MuleSoft applications
- An error occurred while launching Anypoint studio
- Unable to deploy mule application with large size jar file
- ERROR 2024-02-28 14:45:07,856 [WrapperListener_start_runner]
- How do I take values from query parameter of `listener` component and apply it to query parameter of `request` component in Mulesoft Anypoint Studio?
- Accessing MuleSoft Anypoint Exchange Properties
- Maven Base Command Line Behavior with Munit Tests in Anypoint Studio 7.16
- Rate limiting API Mulesoft
- Converting "2024-01-10T10:50:16.901-0500" timestamp to "2024-01-10T10:50:16.901Z" in DWL 2.0/Mule4
- Why is my pom.xml file getting updated, everytime I'm trying to deploy an application from Anypoint Studio to CloudHub?
- Mulesoft Anypoint Studio - pass the id from my variable into flow-reference
- XML processing getting different in result in DataWeave playground and Vscode vs Anypoint Studio/Mule runtime
- MuleSoft always returns back a 500 internal server error response from target API to source API even though another error occurred in the Target API
- Anypoint Studio Salesforce Analytics Connector - Unable to Upload and Process Dataset
- How to convert string to array and object in mule 4
Related Questions in MULE4
- How to compare two dates with only month and year in mule
- How can I effectively manage SFTP Private key files in MuleSoft applications
- Get flow name from subflow
- Convert a single column values into multiple rows using dataweave
- How to dynamically convert an list of strings into key value pair using dataweave 2.0
- Using $ in a string in a dataweave expression
- Using Maven to build an Java SDK Mulesoft plugin snapshot
- Generating an Array based on a total Count and split Number
- Mulesoft Dataweave use a map to update an object or use the update function or update operator
- Mule 4 why is the playground result different than a transform component
- What should be my response body in raml if i am sending hashmap as response?
- How do I transform the incoming JSON payload having objects to a payload having a list of the objects expected by the downstream system
- Import Java Jar in Mulesoft Project
- How to query Bigquery table using Query operator
- Mule4 JWT connection to BigQuery fails during build
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?
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)
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)