FHIR Chat · FHIR DocumentReference attachments and Content-Disposition · implementers

Stream: implementers

Topic: FHIR DocumentReference attachments and Content-Disposition


view this post on Zulip David Teirney (Aug 12 2016 at 00:20):

Has anyone implemented an attachment implementation within FHIR DocumentReferences that returns back a URI that ends up returning an HTTP response with a Content-Disposition: header? FHIR doesn't appear to have a concept of being able to provide a URI to download the content with a Content-Disposition header set vs a "stream" based HTTP response that doesn't have that header set.

view this post on Zulip Grahame Grieve (Aug 12 2016 at 00:22):

I'm a little out of touch in this area. Do you still need a content-disposition header if you specify the mime type correctly? why?

view this post on Zulip David Teirney (Aug 12 2016 at 00:23):

Content-Disposition is orthogonal to Content-Type. https://tools.ietf.org/html/rfc6266#section-4.2

view this post on Zulip David Teirney (Aug 12 2016 at 00:24):

It's used to indicate that the response should be treated "inline" or as an "attachment". It's most often used to be able to trigger a download in a web browser or other client rather than having that client try and render directly.

view this post on Zulip David Teirney (Aug 12 2016 at 00:26):

We've got a use case where the client can both view the content and also trigger a download. The latter requires that header to be set. So we're currently setting it all the time and making sure our clients are not relying on the browser to directly load the HTTP stream, e.g. we put the URI into an iframe to ensure that it gets loaded into that frame.

view this post on Zulip David Teirney (Aug 12 2016 at 00:29):

We're wondering if anyone else has a similar use case. And, if so, how they approached it.

view this post on Zulip John Moehrke (Aug 12 2016 at 14:55):

David, My read of content disposition seems to be more associated with interactive sessions, it doesn't seem legitimate for an API. I am not sure how a Resource Server would know enough about the client side setting/context to make the determination. Can you enlighten me on your use-case details?

view this post on Zulip Grahame Grieve (Aug 12 2016 at 19:58):

well, it's kind of what you would want to happen in a browser app if you wanted tot use the http server, not the http api server.

view this post on Zulip Grahame Grieve (Aug 12 2016 at 19:58):

but this is not well differentiated.


Last updated: Apr 12 2022 at 19:14 UTC