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 local file-based assets #141

Closed
fluffy-critter opened this issue Dec 14, 2018 · 0 comments · Fixed by #167
Closed

Support local file-based assets #141

fluffy-critter opened this issue Dec 14, 2018 · 0 comments · Fixed by #167
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fluffy-critter
Copy link
Collaborator

fluffy-critter commented Dec 14, 2018

Expected Behavior

Right now, non-rendered files (SVGs, PDFs, C source code, etc.) work as static resources but it would be nice if they could also work as resources linked to in the local directory.

Possible Solution

Files which aren't indexed by other indexers could be indexed as "asset" files, and get a new endpoint (e.g. /_assets/) which maps to them.

For security/privacy (to prevent the download of raw entry content files etc.), the _assets endpoint should be in the form of _assets/<id:str>/<filename:str> where the ID is (pseudo?)randomly generated, perhaps based on the file hash, and both the ID and the filename should match.

There should also be a configuration for which file extensions should be whitelisted into the asset store.

Context

Being able to keep a .pdf or .svg or .cpp or whatever alongside the entry that refers to it, making asset management simpler instead of having to think about whether a file is stored in the static folder or not.

@fluffy-critter fluffy-critter added the enhancement New feature or request label Dec 14, 2018
@fluffy-critter fluffy-critter added the images Stuff to do with image renditions label Jan 4, 2019
@fluffy-critter fluffy-critter removed the images Stuff to do with image renditions label Feb 22, 2019
@fluffy-critter fluffy-critter changed the title Support SVG in local images Support local file-based assets Feb 22, 2019
@fluffy-critter fluffy-critter self-assigned this Feb 27, 2019
@fluffy-critter fluffy-critter added this to the v0.3.18 milestone Feb 27, 2019
@fluffy-critter fluffy-critter modified the milestones: mullins-site, 0.4.0 Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant