-
Notifications
You must be signed in to change notification settings - Fork 0
watermarkable attachments #5
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
base: master
Are you sure you want to change the base?
Conversation
I do wonder if this could just be called Another field would be necessary to indicate requiring watermarking, or a combination of #nonblocking |
I considered this. You'd need to enforce the |
""" | ||
Uploads a sample file for the given user. | ||
""" | ||
opts = {} if opts == None else opts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparisons with None
need to use is
. Edit: this is a PEP8 guideline not a requirement so #non-blocking
opts = {} if opts == None else opts | |
opts = opts or {} |
Flagging that the migration will lock+rewrite the attachments table, which probably isn't a big deal. |
The PR adds a
requires_watermark
boolean 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.