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

Svg image stored as File object make folder list crash #1513

Open
fabien-michel opened this issue Jan 8, 2025 · 2 comments
Open

Svg image stored as File object make folder list crash #1513

fabien-michel opened this issue Jan 8, 2025 · 2 comments

Comments

@fabien-michel
Copy link
Contributor

I don't know how it happened, but 4 years ago an svg file was uploaded using filer and it was stored in database as a File and not an Image object. (still has `'image/svg+xml' mime though)

Since "recent" modifications of filer, this situation make filer crash when trying to list the folder with this file.

It crash here

return self.get_admin_url("expand")

because the expand admin url, does not exists in FileAdmin here:
def get_urls(self):

Because the URL exists in ImageAdmin, and in normal scenario a SVG file is stored as an Image, it doesn't fail.

@fabien-michel
Copy link
Contributor Author

fabien-michel commented Jan 8, 2025

I've found 6 files of 585 which are SVG but stored as File

@jrief
Copy link
Collaborator

jrief commented Jan 8, 2025

does this happen with all SVG files or only specific ones?

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

2 participants