Open tractorcow opened 6 years ago
This would solve issues around real life implementations that require a file to be private-only and/or available for tests, without being published.
Getting the protected URL via the backend code for reading would improve usability massively. This should however be "backend only" and not accidentally expose the file.
This would solve issues around real life implementations that require a file to be private-only and/or available for tests, without being published.
You can use TestAssetStore
for testing assets
@Firesphere URLS and paths are separate. No local path implies a public url is available, and vice versa.
@tractorcow I know, I'm just describing the issue I'm running in to while also being on leave and not really paying attention :)
@robbieaverill Using TestAssetStore
for production sounds like a recipe for disaster, so not an option
@Firesphere 100%! don't do that
As highly requested, users of the new abstracted asset backend are not used to not having a local path available.
This implementation would provide a guaranteed local (but readonly) path to a given asset.
For local filesystems, this would return the real local path.
For remote filesystems, getAsStream() would be used to create a temporary file, which is marked for destruction on shutdown.