Skip to main content
Solved

RasterReplacer is unable to recognize attachments from ESRI Portal

  • October 21, 2020
  • 7 replies
  • 196 views

Using an Esri ArcGIS Portal Feature Service Reader to read attachments, RasterReplacer fails on the attachment blob with INVALID_FEATURE_CANNOT_READ_BLOB.

Enable Attachments='Y' on the reader, the arcgisonline_attachment{} list is exposed, and arcgisonline_attachment{}.data contains data.

 

I am able to manually download jpg attachments from Portal successfully. I've tried all the image formats in RasterReplacer against the jpg in Portal.

 

Any help would be much appreciated. Thanks!

 

FME 2019.2.1.0, Portal 10.6.1

Best answer by andreaatsafe

kdedovesh wrote:

Hi Andrea,

Thanks for the reply!

 

Yes, I have tried "JPEG (Joint Photographic Experts Group)", and the content_type is image/jpeg. (screenshot attached)contenttype

No problem, so it looks like the data is not in the standard JPEG blob format as JPEG blobs usually start with the byte marker FFD8, hence the RasterReplacer is rejecting it.

 

Try first using a BinaryDecoder set with the following parameters:

  • Encoding type to "Base64" and
  • Attribute to Decode to"arcgisonline_attachment{0}.data"

Then use the RasterReplacer and set it to "JPEG (Joint Photographic Experts Group)".

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

7 replies

andreaatsafe
Safer
Forum|alt.badge.img+10

Hi @kdedovesh​ ,

Have you tried using the "JPEG (Joint Photographic Experts Group)" format for the RasterReplacer?

 

Can you confirm what the value of the "arcgisonline_attachment{0}.content_type" attribute is when you inspect a feature from the reader?

AGOL_AttachmentInfo


  • Author
  • October 21, 2020

Hi Andrea,

Thanks for the reply!

 

Yes, I have tried "JPEG (Joint Photographic Experts Group)", and the content_type is image/jpeg. (screenshot attached)contenttype


andreaatsafe
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • October 22, 2020
kdedovesh wrote:

Hi Andrea,

Thanks for the reply!

 

Yes, I have tried "JPEG (Joint Photographic Experts Group)", and the content_type is image/jpeg. (screenshot attached)contenttype

No problem, so it looks like the data is not in the standard JPEG blob format as JPEG blobs usually start with the byte marker FFD8, hence the RasterReplacer is rejecting it.

 

Try first using a BinaryDecoder set with the following parameters:

  • Encoding type to "Base64" and
  • Attribute to Decode to"arcgisonline_attachment{0}.data"

Then use the RasterReplacer and set it to "JPEG (Joint Photographic Experts Group)".


  • Author
  • October 22, 2020
andreaatsafe wrote:

No problem, so it looks like the data is not in the standard JPEG blob format as JPEG blobs usually start with the byte marker FFD8, hence the RasterReplacer is rejecting it.

 

Try first using a BinaryDecoder set with the following parameters:

  • Encoding type to "Base64" and
  • Attribute to Decode to"arcgisonline_attachment{0}.data"

Then use the RasterReplacer and set it to "JPEG (Joint Photographic Experts Group)".

Thank you very much @andreaatsafe​, that worked!


poalgura
  • October 10, 2021

I got this same issue but with png image formats. Does anyone know how to resolve this one too?


philippeb
Enthusiast
Forum|alt.badge.img+18
  • Enthusiast
  • May 25, 2023
andreaatsafe wrote:

No problem, so it looks like the data is not in the standard JPEG blob format as JPEG blobs usually start with the byte marker FFD8, hence the RasterReplacer is rejecting it.

 

Try first using a BinaryDecoder set with the following parameters:

  • Encoding type to "Base64" and
  • Attribute to Decode to"arcgisonline_attachment{0}.data"

Then use the RasterReplacer and set it to "JPEG (Joint Photographic Experts Group)".

You just saved my life! :)


changeofmotion
Contributor
Forum|alt.badge.img

I’m having the exact same issue as described here, and wondering if anyone can help!

 

In my case, I’ve put a Binary Decoder in as suggested by ​@andreaatsafe . Unfortunately the issue persists. 

 

I’ve also tried using an AttributeFileWriter after the BinaryDecoder - this outputs jpeg files, but they are all non-readable/corrupt. Attachments on the ESRI portal are absolutely fine.

 

Any other troubleshooting tips here? 

 

Thanks in advance!

 

 

 

 


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