django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.76k stars 577 forks source link

Thumbnails preview are not generated and missing in admin... #1457

Closed nizyumka closed 6 months ago

nizyumka commented 6 months ago

Description

This bug only in ubuntu server with domain. image

Everything works fine on localhost with the same settings I use Django 4.2.11, django-filer 3.1.1

FILER_STORAGES = {
    'public': {
        'main': {
            'ENGINE': 'filer.storage.PublicFileSystemStorage',
            'OPTIONS': {
                'location': os.path.join(PROJECT_DIR, 'public', 'media'),
                'base_url': '/media/',
            },
            'UPLOAD_TO': custom_upload_to_function,
            'UPLOAD_TO_PREFIX': ''
        },
        'thumbnails': {
            'ENGINE': 'filer.storage.PublicFileSystemStorage',
            'OPTIONS': {
                'location': os.path.join(PROJECT_DIR, 'public', 'media', 'cache'),
                'base_url': '/media/cache/',
            },
        },
    },
    'private': {
        'main': {
            'ENGINE': 'filer.storage.PrivateFileSystemStorage',
            'OPTIONS': {
                'location': os.path.join(PROJECT_DIR, 'public', 'media'),
                'base_url': '/media/private/',
            },
            'UPLOAD_TO': custom_upload_to_function,
            'UPLOAD_TO_PREFIX': ''
        },
    },
}
nizyumka commented 6 months ago

I solved this problem by removing the addition of a slash to the end of admin/icon/{id}