Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support use like sendFile #39

Closed
wmertens opened this issue Jul 16, 2016 · 2 comments
Closed

Support use like sendFile #39

wmertens opened this issue Jul 16, 2016 · 2 comments

Comments

@wmertens
Copy link

I would like to use this in an application where file access is restricted, and to that end there is an authorization layer that then uses sendFile to pass the file to the user.

So basically, given a file (or a stream?) and options, convert, cache, and return a file.

Is that possible to do with the plugins system?

@asilvas
Copy link
Owner

asilvas commented Jul 16, 2016

Not entirely clear what you're trying to do, but yes it should be possible. Feel free to create your own storage plugin. If it's something you feel may be useful to a wide audience, submit as a PR and it may be bundled in.

Examples:

  • S3
  • File System
  • HTTP (Read-only) - Read-only storage plugins are useful for fetching original assets, but can't be used for caching (unless extended with basic auth or some other form of auth)

Once you create your plugin, just set storage = { driverPath: "./my-new-storage-plugin" }.

@asilvas
Copy link
Owner

asilvas commented Aug 18, 2016

Closing. Let me know if more questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants