2020IP / TwentyTwenty.Storage

A cross-cloud storage abstraction
Other
100 stars 26 forks source link

Local File Extensions #20

Closed ccoulson closed 5 years ago

ccoulson commented 6 years ago

I've added many extension methods that allow you to work with the storage provider files locally. Many libraries need the file locally to work with the file, so these allow you to do that without writing code to download, update, delete.... every time you want to use a file. Instead you would just give it the path to the file on the storage provider and then run your local code within a lamba, which will have a local temporary file as a parameter. There are different methods available for different use cases - if you want to update a file, if you only need to read a file, if you're going to be adding a new file....

Additionally when making these changes, I added a few other additions: The ability to just send a full path to the file instead of the container + filename each time Made adjustments so the files can be stored in the root container Adjusted Amazon's ListBlobsAsync to speed it up.