Enchilada icon indicating copy to clipboard operation
Enchilada copied to clipboard

Map a root path to a default provider

Open kevbite opened this issue 8 years ago • 2 comments

It would be nice if you could just map the default root uri say enchilada:// to a given provider.

This would allow us to create an abstraction on top of the storage layer and the uris would stay the same no matter where the data is stored.

enchilada://image.jpg

kevbite avatar Jan 20 '17 11:01 kevbite

Of course it's possible :D, but I'm not sure of its usefulness, or even if it's a good idea.

The idea of having named providers was that you'd name it based on what was being stored there e.g. enchilada://cats/cat1.jpg This could be local drive on dev and azure blob in production - it doesn't really matter because it's based off the provider name. You could be using blob storage one minute, and decide you want to use FTP the next - the URI would stay the same, just the config would change.

If we made it map the root path of the URI to one specific provider configuration - you could only ever have one configuration there - because there'd be no way to know if it was a separate provider or a subfolder of the default one.

sparkeh9 avatar Jan 23 '17 21:01 sparkeh9

True I agree with that, but a lot of frameworks like NServiceBus have a way to store data and would be great to just plug this on the back of them. obviously for them its 1 to 1 relationship for storage.

kevbite avatar Jan 24 '17 09:01 kevbite