Open ptahchiev opened 4 years ago
I wonder if there could be an S3Template
type object that allows other operations since Resource is read only.
There could be a S3Template
but I am wondering if it would bring any benefits over using directly AmazonS3Client
. @ptahchiev do you have some ideas?
using the AmazonS3Client
will require to use the classes for request and response for every operation we want to perform. Instead S3Template
will be an abstraction where just s3Template.create(bucket)
can do the job. For the title I can guess something like s3Template.delete(bucket, resource)
can be useful.
Also, with a configuration properties we can set region for the specific bucket and also transfer acceleration.
The main benefit from a Spring-native client is a consistent API. Currently, the ResourceLoader
operates on URLs, while the S3 library operates on bucket/path string pairs - translating between these is not a big deal, but annoying.
Is your feature request related to a problem? Please describe. I'm trying to delete a resource in my S3 bucket using the spring-cloud AWS API. Seems like it is impossible: https://stackoverflow.com/questions/51304075/how-to-delete-file-from-s3-using-spring-cloud-aws
Describe the solution you'd like Can you please provide support for deleting files on S3? Also APIs for setting ACL permissions, creating a folder, listing files in a folder and last but not least resolving media type of some file is necessary.
Describe alternatives you've considered At the moment I'm using commons-vfs connector to S3 and it works. But I want to migrate to spring-cloud. This issue is a blocker for me.