28 Commits

Author SHA1 Message Date
François de Metz
49ce4649cc
Encode the URL before fetching it. (#7934)
Signed-off-by: François de Metz <francois@2metz.fr>
2020-09-18 10:05:34 +02:00
Alexandre Bodin
9461f20da0 Cleanup upload tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-09-07 19:02:59 +02:00
Cr0s4k
7baad9bbfd
Update file info mutation (#7691)
* added new updateFileInfo mutation

Signed-off-by: Omar Garcia <omarcruz11@hotmail.com>

* added test

Signed-off-by: Omar Garcia <omarcruz11@hotmail.com>

* fixed test

Signed-off-by: Omar Garcia <omarcruz11@hotmail.com>

* Added fileInfoInput

Signed-off-by: Omar Garcia <omarcruz11@hotmail.com>
2020-09-03 12:17:40 +02:00
Bartosz
8c40d2192d
Fix invalid local uploads path (#6925)
* Fix invalid local uploads path

File upload provider does not consider the strapi configuration. This patch should fix the problem.

* getStaticPath -> uploadDir

* Use config.get method

* plugin-upload tests fix
2020-07-27 17:18:55 +02:00
Alexandre Bodin
d1c492a0fa Fix unit tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:09:45 +02:00
Pierre Noël
bbb1353927 remove hidden contentTypes from permission actions list + fix tests
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:05:07 +02:00
Pierre Noël
ae0dcb9745 add route GET /admin/permissions
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:05:06 +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
Alexandre Bodin
f192d5e171 Merge branch 'master' into develop
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-05-07 13:14:23 +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
da910b0b39 Fix create new project cli option for mongo not handled correctly
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

Fix typos

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

Add tests for env helpers

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

Typo

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-29 11:06:44 +02:00
Alexandre Bodin
71d7ecab6c Move proxy to controllers to protect it
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-03 15:34:05 +02:00
Alexandre Bodin
55bdc146b7 Remove video preview setting
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-13 15:41:15 +01:00
Alexandre Bodin
5459981188 Update tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-09 09:04:32 +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
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
7ba6348149 Remove useless test
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-02 16:46:46 +01:00
Alexandre Bodin
924c45e9c0 Fix testing missing config
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-02 16:46:46 +01:00
Alexandre Bodin
2382332a4d Update to a more recent CI os version
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-28 12:06:44 +01:00
Alexandre Bodin
84a9d2902d Only load the right directories
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-28 01:13:33 +01:00
Alexandre Bodin
68fbf77b30 Add new media lib settings. Remove db provider config
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-27 20:26:05 +01:00
Chris Winch
1849a6c915 update upload e2e test to expect number value for size in response 2019-10-24 15:07:02 +01:00
Alexandre Bodin
bf7870de3b Merge branch 'master' of github.com:strapi/strapi into chore/routing-x-forwarded 2019-09-18 17:29:09 +02:00
Alexandre Bodin
9eaabb1d58 Add tests on graphql upload and user perm graphql 2019-09-18 12:07:59 +02:00
Alexandre Bodin
6c2d413ba0 Fix user-permissions graphql permissions and update user 2019-09-18 12:07:45 +02:00
Alexandre Bodin
a22f2cefef Remove x-forwarded-host.
- set security defaults for development mode that are standard
- refactor error messages to work without ctx.request.admin
- remove mask middleware and add a sanitization layer to the core-api to
hide private fileds
2019-09-06 14:33:24 +02:00
Alexandre Bodin
bb036333a2 Init upload plugin e2e tests 2019-08-06 10:46:53 +02:00