You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After we implemented the sync logic here, we implemented the ability to download files, messages, and replies from sources.
The current logic does not delete the file, message, or reply from a source locally when the source is deleted from the database.
Briefly summarizing how we've been doing downloads, we first store them in the data directory with the same filename as the server (this is the filename that the API provides). These downloads can end in:
.gpg (replies or submissions that are messages) e.g. 1-foo-bar.gpg or,
.gz.gpg (submissions that are files) e.g. 1-foo-bar.gz.gpg.
Then, we decrypt (and in the case of files, also decompress) a file, and we store that file again locally in the data directory with the file extension(s) stripped off, i.e. 1-foo-bar. If a file fails to decrypt, it will be stored with the same filename as the server. If it decrypts but fails to decompress, it will be saved as 1-foo-bar.gz.
In this ticket, we should add a storage.py function that deletes all files locally that contain a particular journalist designation (this is term used for the short name associated with a source, e.g. here foo bar). Then we can call that in the sync logic when sources are deleted. This is also needed for #78.
The text was updated successfully, but these errors were encountered:
After we implemented the sync logic here, we implemented the ability to download files, messages, and replies from sources.
The current logic does not delete the file, message, or reply from a source locally when the source is deleted from the database.
Briefly summarizing how we've been doing downloads, we first store them in the data directory with the same filename as the server (this is the filename that the API provides). These downloads can end in:
.gpg
(replies or submissions that are messages) e.g.1-foo-bar.gpg
or,.gz.gpg
(submissions that are files) e.g.1-foo-bar.gz.gpg
.Then, we decrypt (and in the case of files, also decompress) a file, and we store that file again locally in the data directory with the file extension(s) stripped off, i.e.
1-foo-bar
. If a file fails to decrypt, it will be stored with the same filename as the server. If it decrypts but fails to decompress, it will be saved as1-foo-bar.gz
.In this ticket, we should add a storage.py function that deletes all files locally that contain a particular journalist designation (this is term used for the short name associated with a source, e.g. here
foo bar
). Then we can call that in the sync logic when sources are deleted. This is also needed for #78.The text was updated successfully, but these errors were encountered: