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 linking to non-image asset files #167

Merged
merged 1 commit into from Feb 27, 2019
Merged

Conversation

fluffy-critter
Copy link
Collaborator

Summary

Allows the use of assets that PIL doesn't support in both image and link contexts. Fixes #141.

Detailed description

If we try to resolve an image or a link to a file which isn't supported by PIL, the file gets indexed as an asset instead. If a file is indexed as an asset then it becomes retrievable via a URL like _file/<shorthash>/<basename>, which simply sends the file directly if it's been indexed as an asset.

This also ends up refactoring a lot of link handling stuff and makes for fewer weird paths things can go through. There are still a couple of places where utils.remap_link_target are called, but these can probably be refactored away in the future.

Developer/user impact

Test plan

Added a bunch of tests to publ-site; see PlaidWeb/publ-site@66b7a04

@fluffy-critter fluffy-critter merged commit 986c33d into master Feb 27, 2019
@fluffy-critter fluffy-critter deleted the feature/141-assets branch March 3, 2019 08:24
fluffy-critter added a commit that referenced this pull request Mar 4, 2019
Support linking to non-image asset files
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

Successfully merging this pull request may close these issues.

Support local file-based assets
1 participant