Skip to main content
Question

FTP create a binary file from attribute?

  • November 24, 2018
  • 2 replies
  • 28 views

Forum|alt.badge.img

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

I need to http pull binary files, eg pdf, xls and then FTP them elsewhere as part of a migration

I don't really want to download to file so it would be better to download to attribute then FTP up.

 

There is no option to set as 'fme-binary'

 

 

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 26, 2018

Hi @saj42saj,

The FTPCaller doesn't seem to be able to create a binary file upload from an attribute. The transformer seems to be converting the binary values to hex before uploading. I have created a problem report for this issue (FMEENGINE-57600), and will notify you as soon as it is fixed.

In the meantime, you can use the TempPathnameCreator transformer to create a temporary path for the HTTPCaller to download the files to. This folder will be removed as soon as the workspace is finished, so you don't need to do any cleanup.

I am attaching a workspace illustrating how to download a PDF file in the HTTPCaller, get its proper name from the header records, then upload it using the FTPCaller.

UploadFrom HTTP.fmw


Forum|alt.badge.img
  • Author
  • November 27, 2018

Hi @DaveAtSafe, thanks for that.

We cannot get the file name from flat pdf files as the header doesn't contain the right element. We used a similar concept to split the url apart based on forward slash then extract the file name from the last entry in the list.

Thanks for the introduction to a couple of new transformers :-)


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