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


Badge +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

icon

Best answer by danminneyatsaf 10 May 2023, 18:54

View original

5 replies

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

Userlevel 1
Badge +10

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

Userlevel 2
Badge +10

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.

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

Reply