Kendaros
c46b6ccb5e
Keep metadata during resize images ( #10161 )
...
If the input file has EXIF, XMP, IPTC metadata (i.e user disabled "optimize size without quality loss" a.k.a "strip metadata" option in Admin UI), the resized images generated should keep metadata too.
If the user doesn't want to keep metadata, they would let the default option "Optimize size without quality loss" enabled, right? So the resized images wouldn't keep the metadata anyway.
2021-05-11 11:42:31 +02:00
Ben LeFevre
fd42889083
strapi-plugin-upload: Read responsive breakpoints from config ( #9002 )
...
* Read responsive breakpoints from config
* Move strapi.config.get into function
2021-01-28 17:31:09 +01:00
Bartek Igielski
3f1fa39ccb
Prevent returning optimized image if it's larger than original ( #9214 )
...
* Prevent returning optimized image if it's larger than orginal
* Move size checking inside promisse
2021-01-25 18:21:44 +01:00
Alexandre Bodin
07e7cfc0bd
Make lint stricter and fix the errors
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:42 +01:00
Alexandre Bodin
8589848ce4
Merge branch 'features/draft-publish' into releases/3.2
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-01 16:23:32 +02:00
Pierre Noël
567401f0c1
Fix/warn file too big ( #8033 )
...
* handle fileTooBig errors
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* add entityTooLarge error in provider plugins
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* fix linter
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* Add better error message for 413 errors in ML
Signed-off-by: soupette <cyril.lpz@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
* refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
Co-authored-by: soupette <cyril.lpz@gmail.com>
2020-09-29 12:00:25 +02:00
Pierre Noël
09ae61ffab
fix tests
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:40 +02:00
Pierre Noël
36892fe2a8
add webhooks for draftAndPublish + sanitize all webhooks info ( #7629 )
...
* add webhooks for draftAndPublish + sanitize all webhooks info
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:29 +02:00
Pierre Noël
e29c1b7de9
add published_at ( #7374 )
...
* add published_at
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:18 +02:00
Alexandre Bodin
6bafa35a36
Merge branch 'releases/3.1.0' into features/rbac
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-18 10:12:40 +02:00
alxnkt
65293fd21c
Auto rotate JPEG images
...
Signed-off-by: alxnkt <alxnkt@mail.ru>
2020-07-18 10:07:37 +02:00
Convly
5f01d9ebe1
Add permissions on upload controller
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:42 +02:00
Andrey Hohutkin
94e031eba5
Fixes for Media Library upload ( #5971 )
...
* Fix formatFileInfo
Keep original file name including extension
* Fix file name for generated media
File name was not set for all generated media: thumbnail and resized pictures.
* Generate hash based on file name without extension
* cleanup PR
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
* Fix unit tests
Exclude temporarily unit test 'Replaces reserved and unsafe characters for URLs and files in hash' because it did not work properly ever.
* Remove path delimiter from filename because it is correct character for file path
* Fix e2e
* Continue fixes for e2e
* Fix createRequest content type
* Correct thumbnail name in e2e test
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: Andrey Hohutkin <none@none>
2020-06-25 10:13:42 +02:00
Marvin König
fa31b5dfc2
Fix file names containing reserved and unsafe URL characters
...
This fixes the `generateFileName` function in the Strapi upload plugin,
so that reserved and unsafe charactes for URLs are replaced with
underscores.
Signed-off-by: Marvin König <dev@mkqavi.com>
2020-05-13 13:17:26 +02:00
Vanessa
022b228279
Fix issue #5934 - add path folder for thumbnail and breakpoints images ( #6078 )
...
Signed-off-by: Lith <lith@amykron.com>
2020-05-07 09:28:26 +02:00
Alexandre BODIN
5dac3e4866
Add metris to the media lib with ratelimit ( #5946 )
...
* Add daily sender
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
* Add media lib events and ratelimiter wrapper
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-27 16:08:55 +02:00
Alexandre Bodin
b44a57d408
Use path.extname if mime-type doesnt find extension
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-16 10:50:18 +02:00
Alexandre Bodin
7123f68737
Allow to create the media.update webhook + fix default width and height
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-15 19:15:21 +02:00
Alexandre Bodin
d615bf9b7f
Fix svg and gif formatting
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-15 14:54:33 +02:00
Alexandre Bodin
904b2b438b
Use mime-types to set extension
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-03 14:02:26 +02:00
Alexandre Bodin
6f1f774146
Refactor combineFilters
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-31 16:56:49 +02:00
Alexandre Bodin
168ceefa87
Add same filter logic to file count
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-31 14:32:00 +02:00
Alexandre Bodin
9c2f5b5368
fix update file info whith realted
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-27 16:00:26 +01:00
Alexandre Bodin
5de985d724
Clear db formats on replace
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-26 15:52:56 +01:00
Alexandre Bodin
ceb113a865
Add count search on files
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-25 19:17:46 +01:00
Alexandre Bodin
cfdbf5423a
Add file search and create simple sqlite search
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-25 17:34:39 +01:00
Alexandre Bodin
a17770293d
Allow file info edit whitout re upload
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-24 12:21:51 +01:00
Alexandre Bodin
d19189b626
Treat mime ncontains as AND params in files list
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-23 17:30:19 +01:00
Alexandre BODIN
dbaa1848dd
Merge pull request #5553 from strapi/media-lib/ordering
...
Keep media order set on creation
2020-03-23 11:21:57 +01:00
Alexandre Bodin
e10112ed41
fix(upload): fix error on responsive format when disabled
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 18:32:29 +01:00
Alexandre Bodin
3187c08087
Fix uploadTopEntity and delete file relations on fie delete
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:22 +01:00
Alexandre Bodin
02d042769f
Remove file sha that was not standard
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-10 17:26:15 +01:00
Alexandre Bodin
571e829b7a
Fix typos
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 21:52:23 +01:00
Alexandre Bodin
939c8354c0
Create file formatters
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 21:52:23 +01:00
Alexandre Bodin
2d12f88394
Optimize file
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 09:05:43 +01:00
Alexandre Bodin
8d025b89f3
Init optimization func and clean up code
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 09:05:42 +01:00
Alexandre Bodin
e6322e64dc
Move util out of service
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 09:05:41 +01:00
Alexandre Bodin
587cdb5a05
Save thumbnail in forats json
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 09:02:51 +01:00
Alexandre Bodin
607e87431a
Move util out of service
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-06 19:20:48 +01:00
Alexandre Bodin
c567616ba8
Resize only when necessary
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-06 17:01:33 +01:00
Alexandre Bodin
2e0913d5d5
Support thumbnail replacement
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-06 17:01:32 +01:00
Alexandre Bodin
b144b19372
Add thumbnail on upload and handle deletion
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-06 17:01:32 +01:00
Alexandre Bodin
8f6903ac52
Init image manipulation, add dimensions
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-06 17:01:31 +01:00
Alexandre Bodin
c722b0db00
Implement file replace
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-05 13:51:15 +01:00
Alexandre Bodin
7cd34b725a
wip
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-05 10:29:08 +01:00
Alexandre Bodin
70c336cfe9
Add tests and update old tests
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-03 16:41:37 +01:00
Alexandre Bodin
dd93ccd590
Init test for upload service
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-03 16:33:48 +01:00
Alexandre Bodin
e5b319d81e
Update file creation process with fileInfo
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-03 16:33:48 +01:00
Alexandre Bodin
9159bb1c65
Migrate upload providers to new config system
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-02 16:46:44 +01:00
Alexandre Bodin
fd3511b511
Use strapi.plugins.upload.config for provider config
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-02 16:46:44 +01:00