S3 Upload Plugin + thoughts on upload #269
Replies: 2 comments 16 replies
-
Hello @jeanbmar I thought you might be interested, I'm actually working on something like this myself, though it's less S3-specific. https://github.com/richardvanbergen/payload-plugin-cloud-storage
The @jmikrut mentioned this is possible via hooks in this discussion, although I can't see where the local storage is disabled in the linked thread now I'm looking at it.
Yes, there are a couple of gaps in the resize/upload pipeline to my mind. I've just yesterday started making the first steps to supporting If we can get those two things sorted then I think we're all good. For now, I'll be resizing the images myself. |
Beta Was this translation helpful? Give feedback.
-
Hi Guys, |
Beta Was this translation helpful? Give feedback.
-
Hey there,
I've developed a simple plugin to upload files to S3: https://github.com/jeanbmar/payload-s3-upload
Update 08/17/2021
08/06/2021
A few thoughts on upload:
Saving files to disk should be optional. It shouldn't be the S3 or any other cloud plugin role to delete local files. I will try to hack around setting staticDir to /dev/null or something.(implemented in feat: allow completely disabling local file storage #272)Same applies to transformations. For instance, a resizing plugin would take the data buffer, generates an array of buffers with the different sizes, and pass it to the hook chain. As of now, the entire transformation logic would have to be recoded in S3 plugin.(implemented in feat: exposes auto-sized uploads on payload req #270)Overall, the plugin system is easy to understand and works well. Good job!
Beta Was this translation helpful? Give feedback.
All reactions