-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support redirecting to asset preview URLs
Currently the route for assets assumes that it ends with a file extension (for example `.pdf`). In the case of the preview URLs (which end with `/preview`) it thinks the format of the page is `.pdf/preview`. This gets URL encoded into `.pdf%2Fpreview` by Rails and so the redirect doesn't work. Rather than handling the file extension special, this PR changes it to accept any path containing any number of file extensions or slashes in no particular format.
- Loading branch information
1 parent
e4c9a2e
commit 2f9ad4a
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters