Question

FTP create a binary file from attribute?

  • 24 November 2018
  • 2 replies
  • 5 views

Badge

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

Userlevel 2
Badge +17

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

Badge

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