django-filer icon indicating copy to clipboard operation
django-filer copied to clipboard

UPLOAD_TO_PREFIX leaks into thumbnail path

Open evildmp opened this issue 11 years ago • 2 comments

Say you have something like:

FILER_STORAGES = {
    'public': {
        'main': {
            'ENGINE': 'filer.storage.PublicFileSystemStorage',
            'OPTIONS': {},
            'UPLOAD_TO': 'filer.utils.generate_filename.by_date',
            'UPLOAD_TO_PREFIX': 'yabbadabbadoo',
        },
        'thumbnails': {
            'ENGINE': 'filer.storage.PublicFileSystemStorage',
            'OPTIONS': {},
            'THUMBNAIL_OPTIONS': {
                'base_dir': 'filer_public_thumbnails',
            },
        },
    },
}

You'll find that thumbnails are generated in media/filer_public_thumbnails/yabbadabbadoo/date/path/to/item.

Is it intended that UPLOAD_TO_PREFIX should be in that path? It seems odd to me.

evildmp avatar Mar 21 '14 22:03 evildmp

this is by design, as the original will be saved in the database as yabbadabbadoo/..../myfile.jpg and the thumbnail backend just adds the thumnailing options to the filename and saves in the other storage.

To change this, the resulting thumbnail path would have to be post-processed after easy-thumbnails does its thing.

stefanfoulis avatar Jun 13 '16 08:06 stefanfoulis

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 28 '22 23:07 stale[bot]

This will now be closed due to inactivity, but feel free to reopen it.

stale[bot] avatar Aug 30 '22 21:08 stale[bot]