FriendsOfCake / cakephp-upload

CakePHP: Handle file uploading sans ridiculous automagic
https://cakephp-upload.readthedocs.io/
MIT License
551 stars 255 forks source link

Using this plugin to save to AWS S3 #479

Closed mosesliao closed 6 years ago

mosesliao commented 6 years ago

Hi I need some help. How do I save this file to AWS S3? I can't find any examples

davidyell commented 6 years ago

I think you'll need to create your own File Writer which uploads to AWS.

https://cakephp-upload.readthedocs.io/en/latest/interfaces.html#writerinterface

As the plugin uses the phpleague/flysystem in the background, you should be able to knock up an AWS writer using their documentation.

https://flysystem.thephpleague.com/adapter/aws-s3-v3/

josegonzalez commented 6 years ago

The blog post I wrote - which is linked to in the readme - has an example for AWS usage.

As this plugin relies heavily on other libraries for actual file manipulation, I won't be repeating their docs in our own. However, feel free to contribute examples if you think they are important enough.