discourse/spec/fixtures
jbrw fbfd1fd80b
FIX: Allow SVG uploads if dimensions are a fraction of a unit (#13409)
* FIX: Allow SVG uploads if dimensions are a fraction of a unit

`UploadCreator` counts the number of pixels in an file to determine if it is valid. `pixels` is calculated by multiplying the width and height of the image, as determined by FastImage.

SVG files can have their width/height expressed in a variety of different units of measurement. For example, ‘px’, ‘in’, ‘cm’, ‘mm’, ‘pt’, ‘pc’, etc are all valid within SVG files. If an image has a width of `0.5in`, FastImage may interpret this as being a width of `0`, meaning it will report the `size` as being `0`.

However, we don’t need to concern ourselves with the number of ‘pixels’ in a SVG files, as that is irrelevant for this file format, so we can skip over the check for `pixels == 0` when processing this file type.

* DEV: Speed up getting SVG dimensions

The `-ping` flag prevents the entire image from being rasterized before a result is returned. See:

https://imagemagick.org/script/command-line-options.php#ping
2021-06-17 15:56:11 -04:00
..
backups FIX: Backups should use relative paths for local uploads 2020-08-21 15:22:28 +02:00
csv FEATURE: Allow admins to pre-populate user fields (#12361) 2021-03-29 14:03:19 +03:00
db FIX: Restoring backup from PG12 could fail on PG10 2020-06-16 16:04:14 +02:00
emails FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
encodings FIX: Try detecting encoding of RSS feed 2018-08-01 10:41:20 +02:00
feed FIX: Try respecting charset in HTTP header of RSS feed 2018-08-01 10:41:20 +02:00
i18n FIX: Use correct locale when translating without cache 2019-06-05 14:19:56 +02:00
images FIX: Allow SVG uploads if dimensions are a fraction of a unit (#13409) 2021-06-17 15:56:11 -04:00
json FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
md DEV: Update markdown-it from 8.4.1 to 10.0.0 (#8164) 2019-10-08 13:00:22 +02:00
media FIX: Add attachment content-disposition for all non-image files (#10058) 2020-06-17 11:16:37 +10:00
mmdb UX: Use user locale for locations. (#6527) 2018-10-25 10:54:01 +00:00
multisite
onebox FIX: IMDb links were being oneboxed as posters (#13310) 2021-06-07 18:45:59 +05:30
pdf FEATURE: Add attachments to outgoing emails 2019-07-25 15:57:45 +02:00
plugins DEV: Add manifest-src to CSP (#13319) 2021-06-08 09:32:31 -04:00
scss DEV: Run prettier. (#6420) 2018-09-21 11:02:23 +00:00
site_settings
theme_settings DEV: support json_schema in theme settings (#12294) 2021-03-10 20:15:04 -05:00
themes FIX: Allow themes to upload and serve js files (#8188) 2019-10-14 15:40:33 +11:00
woff2