Medias: uploaded image with uppercase extension don't work #436

Closed
opened 2019-01-24 12:56:12 +00:00 by rhaamo · 1 comment
rhaamo commented 2019-01-24 12:56:12 +00:00 (Migrated from github.com)

If uploading a picture with uppercase extension like foobar.JPG, the upload works but the resulting page don't have picture or markdown thingy.
image

If I rename JPG to jpg, everything works fine.

I don't see an error in logs, and debug is way to verbose to understand anything.

Plume version (and/or commit): latest

If uploading a picture with uppercase extension like `foobar.JPG`, the upload works but the resulting page don't have picture or markdown thingy. ![image](https://user-images.githubusercontent.com/8625/51679522-7275c680-1fdf-11e9-94ee-ed477a5d0233.png) If I rename `JPG` to `jpg`, everything works fine. I don't see an error in logs, and debug is way to verbose to understand anything. Plume version (and/or commit): latest
elegaanz commented 2019-01-24 18:24:55 +00:00 (Migrated from github.com)

It is because the code to detect the type of the media (and generate its preview and markdown code) is based on the file extension, and only matches lowercase extensions for the moment. The fix would probably be to lowercase the extension before matching.

It is because the code to detect the type of the media (and generate its preview and markdown code) is based on the file extension, and only matches lowercase extensions for the moment. The fix would probably be to lowercase the extension before matching.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#436
No description provided.