bertramdev / karman-core

Karman Groovy Library
8 stars 7 forks source link

Is there a way to get contents of the file from S3 URL? #6

Open Omnipresent opened 7 years ago

Omnipresent commented 7 years ago

Karman allows to get a file stream this way

InputStream is = s3Provider["bucketname"]["somefile.txt"].inputStream

But is it possible to get a file by an S3 URL? i.e.

InputStream is = s3Provider["bucketname"]["https://s3.amazonaws.com/test-bucket/test/something.png"]

This would allow folders while looking for files. In the above example the folder name is test

If the URL fetching isn't allowed, what is a good way to get files from a folder in a bucket?