Skip to main content
Solved

FTPCaller download & Upload files To/From attribute corrupting the file.


Workbench Flow:

1. Download files from Source FTP Server to an attribute in FTPCaller.

2. Upload these files from attribute to Destination FTP Server .

Files in destination getting corrupted. Attached is the workbench & FME log showing more data is uploaded that downloaded for that file. File type tested are .mdb & .zip

Please advise if someone came across such issue.Thanks.

Best answer by stalknecht

instead of using a download to an attribute try downloading as a file. Is that file also corrupt?

Maybe you use the wrong encoding(utf-8).

View original
Did this help you find an answer to your question?

7 replies

stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • June 10, 2018

instead of using a download to an attribute try downloading as a file. Is that file also corrupt?

Maybe you use the wrong encoding(utf-8).


  • Author
  • June 11, 2018
stalknecht wrote:

instead of using a download to an attribute try downloading as a file. Is that file also corrupt?

Maybe you use the wrong encoding(utf-8).

Hi @stalknecht Thanks for quick response. Download as a file is working fine, file is not getting corrupted.

 

In case of Download to an attribute I could not find much info on Encoding in FME Help. Inside Source FTP Folder there can be several types of file such as .zip,.txt,.mdb how to know which Encoding needs to be applied to which file.

 

 

Thanks

 

 


stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • June 11, 2018
stalknecht wrote:

instead of using a download to an attribute try downloading as a file. Is that file also corrupt?

Maybe you use the wrong encoding(utf-8).

Is uploading the downloaded files working correct?

 

 


  • Author
  • June 11, 2018
stalknecht wrote:
Is uploading the downloaded files working correct?

 

 

Hi @stalknecht yes uploading the Downloaded File worked fine.

 

So to summarize no issue in Download to a file & Upload from a file in FTPCaller.

 

Although we were planning to use Download To & Upload from Attribute so we dont have to save file on Staging server which would eliminate the disc space & Housekeeping Concerns. Thanks.

revesz
Contributor
Forum|alt.badge.img+14
  • Contributor
  • October 19, 2018

I bumped in the same issue.

Initially I generated the file content in PythonCaller. It is all right:

  • if I write the content to a file in the Python code,
  • if I set the file content to an attribute and write the file by AttributeFileWriter
  • if I upload any of the written out files to an FTP server by FTPCaller.

However the shortest way doesn't work. If I set the file contents to an attribute in PythonCaller and attempt to upload it from the attribute in the FTPCaller, the file size doubles on the FTP Server.

Alternatively the issue can be easily reproduced by 2 FTPCallers: one uploads a file directly, the other uploads the contents of the same file read by an AttributeFileReader. The the size of the file uploaded from the attribute is double as the file uploaded directly.

Now I write out the temporary file but I would prefer the attribute upload - without the extra file write/read.


  • Author
  • October 19, 2018
revesz wrote:

I bumped in the same issue.

Initially I generated the file content in PythonCaller. It is all right:

  • if I write the content to a file in the Python code,
  • if I set the file content to an attribute and write the file by AttributeFileWriter
  • if I upload any of the written out files to an FTP server by FTPCaller.

However the shortest way doesn't work. If I set the file contents to an attribute in PythonCaller and attempt to upload it from the attribute in the FTPCaller, the file size doubles on the FTP Server.

Alternatively the issue can be easily reproduced by 2 FTPCallers: one uploads a file directly, the other uploads the contents of the same file read by an AttributeFileReader. The the size of the file uploaded from the attribute is double as the file uploaded directly.

Now I write out the temporary file but I would prefer the attribute upload - without the extra file write/read.

 

Yes.I also had to download to a File than upload from there.

Forum|alt.badge.img
  • November 23, 2018

It'll probably be that your source files are binary rather than text. I've got the same issue as I want to use an http caller to get remote files (eg pdf or xls) then ftp them up onto our servers (we're porting from a remote server).

Is it possible to ftp and create a binary file from attribute?

 

Thanks

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings