Skip to main content

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

 

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*


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.


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..


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