-
Notifications
You must be signed in to change notification settings - Fork 42
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
File download UI / API plumbing #64
Conversation
so for completion of the current ticket, we can just save the files encrypted locally, and then I just filed #66 for adding the decryption step (has a qubes dependency)
I merged the status footer PR so we can liberally put errors for the user there for now |
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.
looks great, i think we just need the status bar messages adding and the saving of the downloaded encrypted file to the right spot in the data dir and then i think we can merge!
securedrop_client/logic.py
Outdated
Called when a file has downloaded. Cause a refresh to the conversation | ||
view to display the contents of the new file. | ||
""" | ||
if result: # pragma: no cover |
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.
where result
will be added to args for on_file_download
@@ -40,6 +40,7 @@ | |||
|
|||
def init(sdc_home: str) -> None: | |||
safe_mkdir(sdc_home) | |||
safe_mkdir(sdc_home, 'data') |
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.
👍
def on_file_download(self): | ||
""" | ||
Called when a file has downloaded. Cause a refresh to the conversation | ||
view to display the contents of the new file. |
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.
though we will just indicate that the file is downloaded instead of opening (the actual opening logic will be dealt with in #20), i.e. "download" before DL and "view" after DL (following the language in the relevant snippets from wireframe):
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.
Right... so I just want to be absolutely certain I grok this:
- There are two sorts of files that can be downloaded and then decrypted: 1) Plaintext files containing a message (from now on "messages"). 2) Attachments files (such a images or PDF docs -- from now on "attachments").
- If a file isn't downloaded we just show that it's ready to be downloaded and encrypted. I'm assuming there's a way to distinguish between messages and attachments due to filename naming conventions, right?
- Once a file (no matter if it is a message or attachment) is downloaded, then this function we will display the contents of the downloaded and decrypted messages as the speech bubbles and the downloaded attachment as a file widget in a viewable/exportable state.
- All pending-download/encryption messages/attachments will just look like the "download" image in your comment.
Sorry for the painful description of detail, but it's important to get this written out somewhere. ;-)
Hey guys—I've had a lot of issues with my prototyping software being buggy, and have been heads-down preparing for user testing... but will upload a relevant time-based mini-prototype capture demonstrating messaging/etc for this, EOD today (90% of which will be for Beta target—whatevs can get built-in for Alpha, we can discuss next week). Thx for all the hard work making this functionality awesome! |
…or further progress.
c8be7ee
to
3846610
Compare
hey - so I made some good progress this afternoon adding more logic for this ticket in
anywho I will work on this later/tomorrow |
hey I finished off the logic for this so pushed here - for @joshuathayer or @ntoll to review (whoever gets to this first 😇 ). I can't formally request your review @ntoll due to the fact you started this PR but I'm going to 👍 these changes to indicate and you should feel free to block if you think changes should be made, or merge if you approve. The way I've been testing this is:
|
oh btw, if one is reviewing from Qubes, you'll need to set |
f2aa88d
to
c277e05
Compare
Oh man... I should check my email before making changes to my local branch. TL;DR I did some minor revisions to my original branch in my local repository, only to get errors when pushing to realise you've covered this stuff already. Just tidying ensuing merge-ageddon and sticking with your changes. Review incoming.... |
OK... I like what you did with the API call ( Everything else makes perfect sense and LGTM. I'll merge fast and break things ™️ ;-) |
Add/test GitHub CodeQL analysis
Very much a WiP PR for file download.