mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-28 14:54:44 +02:00
Try to detect if an external attachment is an image or not.
Before we assumed that it is a picture in all cases.
This commit is contained in:
parent
1c222ff293
commit
15ba6572df
2 changed files with 14 additions and 3 deletions
|
@ -182,8 +182,11 @@ class AttachmentTest extends TestCase
|
|||
return [
|
||||
['%MEDIA%/foo/bar.txt', false],
|
||||
['https://test.de/picture.jpeg', true],
|
||||
['https://test.de/picture.png?test=fdsj&width=34', true],
|
||||
['https://invalid.invalid/file.txt', false],
|
||||
['http://infsf.inda/file.zip?test', false],
|
||||
['https://test.de', true],
|
||||
['http://test.de/google.de', true],
|
||||
['https://invalid.com/invalid/pic', true],
|
||||
['%MEDIA%/foo/bar.jpeg', true],
|
||||
['%MEDIA%/foo/bar.webp', true],
|
||||
['%MEDIA%/foo', false],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue