Flask-Resize icon indicating copy to clipboard operation
Flask-Resize copied to clipboard

use url to detect extension

Open tobias533 opened this issue 7 years ago • 0 comments

Hello,

I try to use for images an url without an extension (jpg,png...), e.g. http://127.0.0.1:5000/picture/123456789abc This is necessary since I use an id in the url and the algorithm searches in the background an corresponding image.

For example, if I use this works fine. The url which was created http://127.0.0.1:5000/picture/123456789abc sends the content type image/jpeg and shows the image in the browser.

If I add the resize command I've got the exception "Only JPG or PNG are allowed...."

If I debug Flask Resize, I see that flask modules uses the url to detect the extension and not the content type of the send content. For me it looks like an issue. Maybe an alternative fix exists?

Thanks Tobias

tobias533 avatar Apr 22 '18 10:04 tobias533