Skip to main content
Question

Corrupt image file when reading and downloading from ArcGIS Portal


jlw_tyrens
Contributor
Forum|alt.badge.img+2

Hi all!

I have a workflow when I read and download image attachments from ArcGIS Online. I have used the AttributeFileWriter to download the image to a unique filename and it has always worked smoothley.

 

Now I am trying to do the same with image attachments from our ArcGISPortal and it works fine to read and download the files, but when I try to open the files it says that “It looks like we don’t support this file format.”

 

If I go to ArcGISPortal and manually downloads the image file, it works fine.

 

Does anyone recognize this phenomenon?

 

Best regards

Johan

 

4 replies

jkr_wrk
Influencer
Forum|alt.badge.img+29
  • April 4, 2022

Could it be that the file downloaded is (.png) for example and you write the file to disk with (.jpg).

 

Or other file format combination?

 

Opening a .jpeg with text editor shows me JFIF within the first 10 characters. Opening a .png shows png within the first 5 characters. I think .tif starts with II*


birgit
Influencer
Forum|alt.badge.img+16
  • Influencer
  • April 4, 2022

Another option is that the portal is still busy fetching the image while you are already downloading it though this might not be applicable for attachments. I have had something like this with exporting FGDBs from an ArcGIS Portal. I downloaded the FGDB while the portal was still busy exporting my service data to the FGDB, the result was corrupted FGDB files on my pc.


jlw_tyrens
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • April 4, 2022
jkr_da wrote:

Could it be that the file downloaded is (.png) for example and you write the file to disk with (.jpg).

 

Or other file format combination?

 

Opening a .jpeg with text editor shows me JFIF within the first 10 characters. Opening a .png shows png within the first 5 characters. I think .tif starts with II*

Thanks for your reply! There is only jpg files in the feature service. That would have been a smooth solution on my problem..


jlw_tyrens
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • April 4, 2022
birgit wrote:

Another option is that the portal is still busy fetching the image while you are already downloading it though this might not be applicable for attachments. I have had something like this with exporting FGDBs from an ArcGIS Portal. I downloaded the FGDB while the portal was still busy exporting my service data to the FGDB, the result was corrupted FGDB files on my pc.

Thank for your reply! I will check into this.


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