Skip to main content

When I use a HTTPCaller to PUT anything fme_binary, the hexadecimal representation as visible in the data inspector is included in the request body, instead of the actual raw bytes. This results in a bunch of unreadable files on the other end.

If I do the put request using the same attribute with a PythonCaller as below everything works fine. The binary data are pngs serialized through a RasterExtractor directly before.

Has anyone run into a similar issue before?

So, this works:

r = requests.put(

 

url=url,

 

data=body,

 

headers={

 

'Content-Type': 'image/png',

 

'x-ms-blob-type': 'BlockBlob'})

This doesn't:

Hi @bleuminkgeo, I think the transformer supports uploading only a file or a string value. It doesn't seem to support uploading a raw bytes from an fme_binary type attribute.

"Upload Data: This parameter identifies the type of data that will be uploaded. The transformer can upload a file, a string value, or a multi-part combination of file and string values." -- HTTPCaller Help

A workaround is, write the raster feature into a file with a FeatureWriter, then upload the file with the HTTPCaller.


Hi @bleuminkgeo, I think the transformer supports uploading only a file or a string value. It doesn't seem to support uploading a raw bytes from an fme_binary type attribute.

"Upload Data: This parameter identifies the type of data that will be uploaded. The transformer can upload a file, a string value, or a multi-part combination of file and string values." -- HTTPCaller Help

A workaround is, write the raster feature into a file with a FeatureWriter, then upload the file with the HTTPCaller.

Thanks @takashi, that explains it.

 


Hi @bleuminkgeo, I think the transformer supports uploading only a file or a string value. It doesn't seem to support uploading a raw bytes from an fme_binary type attribute.

"Upload Data: This parameter identifies the type of data that will be uploaded. The transformer can upload a file, a string value, or a multi-part combination of file and string values." -- HTTPCaller Help

A workaround is, write the raster feature into a file with a FeatureWriter, then upload the file with the HTTPCaller.

Just adding that this is still the case in FME 2020.


Reply