5 Commits

Author SHA1 Message Date
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
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