As far as I know MS word requires an extension to be provided for any
files in the media folder in order to set the content type. Previously
an image without an extension would be allowed which would cause a
corrupted document. This now raises an argument error. In theory
I could check for an extension during context transformation and
raise a ContextError instead but this was simpler and having this
present in the #add_media method means it will work for any media
added and not just images incase an end user extends Sablon's content
types.
As far as I know MS word requires an extension to be provided for any files in the media folder in order to set the content type. Previously an image without an extension would be allowed which would cause a corrupted document. This now raises an argument error. In theory I could check for an extension during context transformation and raise a ContextError instead but this was simpler and having this present in the #add_media method means it will work for any media added and not just images incase an end user extends Sablon's content types.