10 Commits

Author SHA1 Message Date
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
Sebastian Campos
6dce6e362f
fixed typo (#7643) 2020-09-04 14:03:12 +02:00
Pierre Noël
bc96123485 use resolve
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-08-03 11:05:43 +02:00
Pierre Noël
c8207b7809 upload path can be absolute
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-31 17:39:29 +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
3d071f5869 Use static paths
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-29 11:06:43 +02: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
Zakaria Mansouri
f9bc0a9b2e
Update index.js
the public folder shouldn't be hard-coded, it needs to follow the "strapi.config.public.path" value.
I faced this issue on my current project where i have a custom path for the "public" folder for development, replacing:
```
path.join(strapi.config.appPath, 'public', `uploads/${file.hash}${file.ext}`)
```
with
```
path.join(strapi.config.public.path, `/uploads/${file.hash}${file.ext}`)
```
solved my problem, so i need to notify you on this issue.
2019-03-11 19:06:10 +01:00
Jim LAURIE
404afec5de Prefix providers 2018-10-19 09:26:09 +02:00