flask-thumbnails icon indicating copy to clipboard operation
flask-thumbnails copied to clipboard

alternate MEDIA_THUMBNAIL_FOLDER does not work

Open Hoppaz opened this issue 9 years ago • 0 comments

If I try to set an alternate folder via app.config['MEDIA_THUMBNAIL_FOLDER'] app.config['MEDIA_THUMBNAIL_URL']

I see that it allways try to write to the original folder.

The problem is that in init.py/class Thumbnail/thumb_url = os.path.join(self.app.config['MEDIA_THUMBNAIL_URL'], url_path, miniature)

url_path starts_with trailing '/' and this leads to: thumb_filename='%s/%s' % (url_path,minitature) -> same for thumb_url

You can see what happens if you use os.path.join('/a','/b','/c') vs os.path.join('/a','b/b','/c')

Hoppaz avatar Sep 28 '15 09:09 Hoppaz