-
Notifications
You must be signed in to change notification settings - Fork 583
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
Uploading SVGs without easy-thumbnails[svg] leaves db in inconsistent state #1433
Comments
Quickhack, copied some code from filer. but I get a lot of these errors: Dimensions are not updated. And it takes a very long time, for every single SVG. One can argue that my SVGs are too complex or whatever, but these are valid SVGs. I can provide examples if needed? UPDATE: All above is true, except that it actually works! Dimensions are set. I've corrected my code, this could be used in filer in this or similar form...for people that forget easy-thumbnails[svg]. |
@benzkji Can I interest you in creating a PR with that code? I am not sure if that error throws an exception. Maybe just catch the output? |
yes. master is the branch to branch off, right? |
It doesnt throw an error, but logged 10'000 entries to my Sentry this morning. PR on the way. |
No, this is a django-filer issue and has to be addressed here. |
@jrief have you seen the PR? Not sure which direction to go. Also, fixing (with management command) is one thing, and preventing getting in an inconsistent state is another. |
not really sure...as #1434 only does help when things already went wrong...but prevent getting there would be the goal. I don't have a definitive answer, but tend to the "deny uploads" when SVG support is not available? If you decide to not do anything, I'm fine too, feel free to close then ;-) |
Or maybe just turn a SVG into a |
Yes, but could lead to other undesired situations (client uploads a few SVGs, then has to re-upload and re-assign everything, when "no SVG support" is detected). I now know about, so...it's just about finding the most accessible solution for people who don't. I would prefer an Image withouth width, and being able to call the managemen command later on. |
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. |
This will now be closed due to inactivity, but feel free to reopen it. |
Without easy-thumbnails[svg] (i.e. reportlab) SVGs are still uploaded/stored as
Image
, but they have width=Null and height=Null stored. To be really consistent, one could store SVGs asFile
, when no support for that image format is available? Or deny SVG upload completly, without support?Currently, it can be a pain, as one can start a project without knowing this, and ending up with a few hundred svgs in the db, without dimensions.
Dont know what the best solution could be...?
The text was updated successfully, but these errors were encountered: