8 Commits

Author SHA1 Message Date
Giulio Montagner
f8af92b375
fix: add sizeInBytes for upload providers (#19593) 2024-02-23 11:37:26 +01:00
Josh
5dcfae1dbc
chore: pack-up providers (#18320)
* chore: convert upload-local

* chore: convert upload-cloudinary

* chore: convert upload-aws-s3

* chore: convert email-sendmail

* chore: convert email-sendgrid

* chore: convert email-nodemailer

* chore: convert email-mailgun

* chore: convert email-amazon-ses

* chore: convert audit-logs-local

* chore(utils): fix eslint error
2023-10-05 16:50:32 +01:00
Convly
b4a4e42919 Merge branch 'main' of github.com:strapi/strapi into releases/4.11.6 2023-07-19 16:47:47 +02:00
Jen Tak
5c87d997cf
Update packages/providers/upload-cloudinary/src/index.ts
Co-authored-by: Marc Roig <marc12info@gmail.com>
2023-07-03 11:07:01 +02:00
Jen Tak
114fbeb954
Chunk Cloudinary uploads only for large files
This alleviates a performance regression introduced by #16621.

It turned out uploading in chunks is quite a bit slower. In my testing a 42MB file uploaded in 5 seconds using regular upload and 31 seconds using chunks.

Use regular upload when possible and only chunk files when required by Cloudinary's 100 MB limit.

Ironically, files larger than 100 MB will still upload painfully slow. There's nothing to be really done here. There's even this thread on Cloudinary's support forum where they claim that a 1 MB/s upload speeds are "completely normal".
https://support.cloudinary.com/hc/en-us/community/posts/5524874765970/comments/5551989993106
2023-06-28 23:32:00 +02:00
Alexandre Bodin
8e1e7317a7 Improve types 2023-06-26 17:29:11 +02:00
Jen Tak
d9640031df
Use upload_chunked_stream instead if upload_stream
Cloudinary limits the filesize to 100 MB when uploading in a single request:
https://cloudinary.com/documentation/upload_images#chunked_asset_upload

Larger files must be uploaded in chunks.

Use the upload_chunked_stream to upload all files in chunks. This works for small files just as well.

Closes #16601
2023-05-04 19:19:28 +02:00
Alexandre BODIN
28d82d3333
Migration of providers to ts (#16323) 2023-04-13 08:45:44 +02:00