-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration defaults for sulu_get_media_url are wrong #248
Comments
@patkar Is it possible that this is handled internally different, without the need of a configuration? Then the example would be confusing (or even wrong), but it would really work that way. |
I would need to test. As I examined the code at that moment, the |
The text is little confusing but it dont mean that this is default: |
Yeah, that's right... Also the configuration is a bit confusing... There has always to be one array empty? Anybody willing to rewrite that in a less confusing way? |
No the text is really confusing because it describe how the config is then when you want this case. If the mime_type is not in |
Better would maybe 2 examples: Set default to sulu_media:
disposition_type:
default: "attachment"
mime_types_inline: ["application/pdf", "image/jpeg"] Set default to sulu_media:
disposition_type:
default: "inline"
mime_types_attachment: ["video/mp4"] It don't make sense to use And it should describe there that sulu default config is setting the disposition type to |
Still strange to have only these two values, especially because there are a lot more values allowed: http://www.iana.org/assignments/cont-disp/cont-disp.xhtml#cont-disp-1 But that's not the point here, we should clearly explain it better. |
Then the config need to be a free array or something. Currently it allows only the 2 from Symfony defined disposition types: https://github.com/symfony/http-foundation/blob/2.8/ResponseHeaderBag.php#L24-L25 |
What I find a little strange that the |
Actual Behavior
https://github.com/sulu/sulu-docs/blob/develop/reference/twig-extensions/functions/sulu_get_media_url.rst mentions that
attachment/pdf
andimage/jpeg
mimetypes are configured by default to be inlined, which is not true.app/console config:dump-reference sulu_media
says:Expected Behavior
Either the sensible defaults like mentioned in the docs or adapting the docs, which options are default and still showing how you configure e.g. PDFs to be inline.
The text was updated successfully, but these errors were encountered: