Using Mulesoft Anypoint Platform: I have a use case where the request is to download a csv from azure blob and upload the same file to a sftp server. The problem arises in the sftp connector (write), at the last step, which is the actual upload to sftp. There are two fields under the general settings for this step. They are "path" and "content", as path I have chosen the variable which holds the downloaded csv file. All the data looks good in the preview by pressing down arrow on the variable block. I don't understand what should go in the content field, it says "content to be written into the file". I just want to pass the file along in the flow, no transformation. Is this necessary, any ideas? The error in the output section reads "Cannot write a null content". If I keep the value as "payload" in the content field.
Asked
Active
Viewed 114 times
0
-
this should directly write the content of your file to myfile.txt. in case you want to trasnform the content you can add a transform message component within the sftp:write. let me know and if you still need help i will try to write a sample – satish chennupati May 07 '19 at 15:58
-
thanks for your reply, i am not really sure where to put that expression, keep in mind i am currently using design center online so that ends up as an invalid expression, maybe it just needs to be formatted differently? – Sebastian Håkansson May 07 '19 at 18:15
-
so you are not using studio ? ok let me see if i can fetch an example for you so that you understand it better.... – satish chennupati May 07 '19 at 18:47
-
payload should be the expression the content field, if you want to write the current content of the message payload running through your flow. It depends on the payload before the sftp write though. how do you get the csv file content from azure, are you storing it in the payload or a var? – Ryan Carter May 08 '19 at 11:14