Question

FME Server Generic Writer and MIME Type

  • 13 March 2018
  • 1 reply
  • 16 views

Badge +7

Has anyone managed to construct a workspace with the following requirements:

  • Only to be used in Datastreaming service
  • Generic writer with different file based outputs (demo pdf+png)
  • FME Server streams the correct mime type with the response file

My current experiment was to use a private python parameter which generates the correct mime type string depending on the format.

 

But even with this, the data streaming sends a PDF but the response headers contain "Content-Type ?image/png".

Is this possible at all?


1 reply

Badge +1

Old question but i recently had issues with this as well. The use case is that we have an FME Server app and want to serve diffrent formats straight to the browser (HTML, JSON, etc) based on which selection the user did. However, as soon there are more than one writer in the workspace (even if only one is used), the datastreaming service will always return the mime-type "application/octet-stream". the browser will then download the file rather than showing it directly. Very annoying in FME Server apps! Anyone found a workaround for this? Didnt work with generic writer either.

Reply