Skip to main content
Solved

I am uploading images (.JPG) as attachments to a hosted feature service (AGOL) using the HTTP Caller transformer. The images are transferring just fine - but the server (AGOL side) is assigning the incorrect mime type


Forum|alt.badge.img+1

The images are successfully uploaded, but the server assigns the incorrect mime type. This causes the images to download, and not display in browser. I have tried setting the 'content_type' manually to 'image/jpeg' - but the server seems to assign the mime type to 'application/octet-stream' every time.

 

my config is below. am I using the wrong syntax/config? thanks....

 

Multipart upload is as follows:

Multipart Upload 

 

HTTP Caller Parameters

Best answer by danminneyatsaf

By default, the MIME Type for Uploads in the HTTPCaller are set to 'applicaiton/octect-stream'. To change this so the file is uploaded correctly as a image/jpeg, you can set the MIME Type for each of your uploads before running the HTTPCaller.

In the HTTPCaller, click the drop-down arrow next to the Upload you want to adjust, then click Edit Parameters. In the window that opens you will be able to change the MIME Type to image/jpeg. See the image attached to this comment for reference.

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

6 replies

andrewshakes
Contributor
Forum|alt.badge.img+1
  • Contributor
  • November 8, 2022

I'm experiencing the same issue in FME v2020.1 which our FME server is on. Which version of FME are you using @vhruska13​ ? I managed to narrow down the issue to certain versions of the HTTPcaller. I haven't tested all versions, but I found:

  • Version 2 and 5 - which come with FME v2020.1 and FME v2022.0 (?) present the issue
  • Version 3 of the HTTPcaller seems to work ok (possibly FME v2021) I uninstalled several versions of FME after authoring the workspace.

Below are some screenshots of the same attachment, uploaded using different versions of HTTPcallers.

FME v2022 httpcaller content_type accepted by the rest apiFME v2020.1 httpcaller content_type ignored by the ArcGIS Online rest api


nampreetatsafe
Safer
Forum|alt.badge.img+12

Hi @andrewshakes​,

I'm sorry you're experiencing this issue. I see there were some efforts on our side to reproduce this issue but were unsuccessful. Would you mind testing this out with Version 6 of the HTTPCaller available in the latest FME 2022.2 Release and see if you're experiencing the same issue? If you are still experiencing the issue, please submit a support case including your workspace and log file as a starting point for our support team to investigate.


andrewshakes
Contributor
Forum|alt.badge.img+1
nampreetatsafe wrote:

Hi @andrewshakes​,

I'm sorry you're experiencing this issue. I see there were some efforts on our side to reproduce this issue but were unsuccessful. Would you mind testing this out with Version 6 of the HTTPCaller available in the latest FME 2022.2 Release and see if you're experiencing the same issue? If you are still experiencing the issue, please submit a support case including your workspace and log file as a starting point for our support team to investigate.

Hi @nampreetatsafe​ sorry it took me so long to respond! I finally installed v2022.2.5 today and tested this again. Still the same issue with v6 of the HTTPCaller but I think I found the likely cause. I'll raise a support case and send more info.


danminneyatsaf
Safer
Forum|alt.badge.img+12

By default, the MIME Type for Uploads in the HTTPCaller are set to 'applicaiton/octect-stream'. To change this so the file is uploaded correctly as a image/jpeg, you can set the MIME Type for each of your uploads before running the HTTPCaller.

In the HTTPCaller, click the drop-down arrow next to the Upload you want to adjust, then click Edit Parameters. In the window that opens you will be able to change the MIME Type to image/jpeg. See the image attached to this comment for reference.


andrewshakes
Contributor
Forum|alt.badge.img+1

That works - thanks! I didn't know the mime type was configured that way, I thought it was set through the content_type REST parameter. I'd suggest this is added to the HTTPCaller transformer help - it currently mentions mime type in the 3rd column but not how to set it using the dropdown parameters.

I appreciate it is already a very busy help page.

http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/httpcaller.htm

Mime type help


salvaleonrp
Enthusiast
Forum|alt.badge.img+15
  • Enthusiast
  • July 13, 2024

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