Skip to main content
Solved

Invalid Base64 Character reading AGOL Attachments


bretr
Contributor
Forum|alt.badge.img+2
  • Contributor

I am trying to read attachments from an AGOL feature service. Specifically, it is a jpg image. I have the reader feed into a BinaryDecoder set to Base64, outputting Binary(fme-binary), then going into a rasterreplacer. Error occurs on the BinaryDecoder. The error is:

BinaryDecoder(TextEncoderFactory): Invalid Base64 character 'ÿ'

Does anyone know how to handle or avoid this error?

 

Thanks!

Best answer by lars_de_vries

If I remember well, you do not need the BinaryDecoder. You should be able to just use the RasterReplacer. Set the attribute that contains the raster as the Blob attribute and choose the correct Format, JPEG in most cases. That should do the trick.

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

4 replies

lars_de_vries
Forum|alt.badge.img+10

If I remember well, you do not need the BinaryDecoder. You should be able to just use the RasterReplacer. Set the attribute that contains the raster as the Blob attribute and choose the correct Format, JPEG in most cases. That should do the trick.


bretr
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 7, 2019
lars_de_vries wrote:

If I remember well, you do not need the BinaryDecoder. You should be able to just use the RasterReplacer. Set the attribute that contains the raster as the Blob attribute and choose the correct Format, JPEG in most cases. That should do the trick.

I tried this transformer but it doesn't seem to work for what I am trying to accomplish. Basically, I am just needing to read the attachment from an AGOL feature service, so I can then save it to a different geodatabase as an attachment there.

 

Has anyone else seen this error reading attachments from AGOL?

 

Cheers!

gazza
Contributor
Forum|alt.badge.img+6
  • Contributor
  • March 7, 2019

I've got a workspace that backups data from AGOL into SQL, with attachments I don't do any encoding or decoding of the attribute containing the image, it just goes straight into a SQL field of with the SQL writer having a type of image.

A workspace that extracts the attachments from SQL to files just uses an AttributeFileWriter that has Target File Encoding set to Binary (fee-binary).

 


bretr
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 7, 2019
lars_de_vries wrote:

If I remember well, you do not need the BinaryDecoder. You should be able to just use the RasterReplacer. Set the attribute that contains the raster as the Blob attribute and choose the correct Format, JPEG in most cases. That should do the trick.

Yup, looks like I was overcomplicating it. This works. Did a quick test and looks like this will work.

 

Cheers!


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