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

Allow hosting files from a custom directory #178

Open
GentlemanHal opened this issue Jun 7, 2017 · 1 comment
Open

Allow hosting files from a custom directory #178

GentlemanHal opened this issue Jun 7, 2017 · 1 comment
Labels
new feature A new feature

Comments

@GentlemanHal
Copy link
Member

GentlemanHal commented Jun 7, 2017

This would allow users to select local images (dialog or DnD) for use on the success screen.

This would be possible by storing the encoded image in local storage. We would need to test this to see if we get issues trying to store large blobs of data locally.

Edit: I'm thinking this might be better as an option on the server which allows it to serve up a local directory. This would be disabled on nevergreen.io for obvious reasons but would work for people self hosting, which appears to be most people.

@GentlemanHal GentlemanHal added the new feature A new feature label Jun 7, 2017
@GentlemanHal GentlemanHal added this to the Settings update milestone Feb 11, 2020
@GentlemanHal GentlemanHal removed this from the Settings update milestone Nov 22, 2022
@GentlemanHal
Copy link
Member Author

GentlemanHal commented Jan 13, 2023

I have decided I'd rather this be a server side option.

To make sure this isn't enabled by accident, this should be off by default. To turn it on the user can pass a new environment variable CUSTOM_HOSTING=enabled or something (exact name and value TBC). If this variable is given with the correct value then a second environment variable must be passed with the directory to host from e.g. CUSTOM_HOSTING_PATH=/whatever (name also TBC)

We can then hopefully just pass this path to wrap-defaults in app_routes.clj to get Ring to automatically serve up any files in the directory 🎉

We would have to make sure this path doesn't override the default public directory we serve the client from.

I'm also not entirely sure how we'd test this, as we'd be relying on Ring to do the heavy lifting. This might have to be a new integration test that actually starts up the server and tries to GET a custom hosted file 🤔 Note: we don't currently have any integration tests that actually start the server.

@GentlemanHal GentlemanHal changed the title Using local images on success Allow hosting files from a custom directory Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature
Projects
None yet
Development

No branches or pull requests

1 participant