Add environmental variable to control path of media #683
No reviewers
Labels
No labels
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Plume/Plume#683
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "Media-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This was a request made on the matrix chat that will make it possible to release a snap version, that environmental variable being
MEDIA_UPLOAD_DIRECTORY
Codecov Report
This looks correct to me; I'm not familiar with Rocket's
#[get()]
routing stuff, so someone else should check that this is correct.I'll give it a test! Thanks!
👀
is this supposed to be deterministic?
Is it deterministic? It seems to come up with new GUIDs each piece we upload.
(We don't think we quite understand)
aah, never mind, i was thinking of something else
(the deterministially random id we use per release for our assets)
I haven't tested yet, but apart from a minor path mistake, it looks good to me 🙂
the
media
part is already included in the default value of media_directory (static/media
). I don't know if it should be removed from here or from there (it depends on how custom directory should appear), but I think there is one too muchOh, thanks for the catch.
I've built a snap from this locally, setting the new
MEDIA_UPLOAD_DIRECTORY
appropriately, and it works!Once this lands I'll push a PR for the snapcraft metadata and we'll have a fully-functional snap that I can then document! 😁
Looks good to me! Thank you for your help! 👍