watermarkable attachments#5
Open
ddouglascarr wants to merge 5 commits into
Open
Conversation
dannyshaw
approved these changes
Jul 23, 2020
|
I do wonder if this could just be called Another field would be necessary to indicate requiring watermarking, or a combination of #nonblocking |
Author
|
I considered this. You'd need to enforce the |
MattFisher
reviewed
Jul 23, 2020
| """ | ||
| Uploads a sample file for the given user. | ||
| """ | ||
| opts = {} if opts == None else opts |
There was a problem hiding this comment.
Comparisons with None need to use is. Edit: this is a PEP8 guideline not a requirement so #non-blocking
Suggested change
| opts = {} if opts == None else opts | |
| opts = opts or {} |
MattFisher
approved these changes
Jul 23, 2020
|
Flagging that the migration will lock+rewrite the attachments table, which probably isn't a big deal. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR adds a
requires_watermarkboolean field to the attachments model. When an attachment is uploaded with this set to True, the attachment is uploaded to a different location in theprivate_attachments/namespace.It is up to the consuming application to make sure this location is private.
This enables watermarking by providing:
The file will not be accessible once uploaded. (If you click on the link, you should be denied access). It is up to the consuming application to provide a way to watermark the source file, and provide a means to download it.