Skip to content
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

alternate MEDIA_THUMBNAIL_FOLDER does not work #6

Open
Hoppaz opened this issue Sep 28, 2015 · 0 comments
Open

alternate MEDIA_THUMBNAIL_FOLDER does not work #6

Hoppaz opened this issue Sep 28, 2015 · 0 comments

Comments

@Hoppaz
Copy link

Hoppaz commented Sep 28, 2015

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant