jp (file): new get command + encryption with upload:
- new file/get command let download a file from URL. It handles `aesgcm:` scheme by thanks to backend decryption on the fly. - new `--encrypt` option for upload. When used, the file will be encrypted using AES-GCM algorithm, and the `aesgcm:` URL will be returned - for both commands, the XMLUI note is displayed in case of error
This commit is contained in:
parent
5c1dd0da49
commit
2d49de9209
1 changed files with 119 additions and 7 deletions
|
|
@ -118,6 +118,23 @@ Several files are expected from Louise, accept them and store them do
|
|||
|
||||
$ jp file receive --multiple --path ~/Downloads/Louise louise@example.org
|
||||
|
||||
get
|
||||
===
|
||||
|
||||
Download a file from an URI. This commands handle URI scheme common with XMPP, so in
|
||||
addition to ``http`` and ``https``, you can use it with ``aesgcm`` scheme (encrypted files
|
||||
with key in URL, this is notably used with OMEMO encryption).
|
||||
|
||||
As usual, you can use ``-P, --progress`` to see a progress bar.
|
||||
|
||||
example
|
||||
-------
|
||||
|
||||
Download an encrypted file with a progress bar, and save it to current working directory
|
||||
with the same name as in the URL (``some_image.jpg``). The URL fragment part (after ``#``)
|
||||
is used for decryption, so be sure to not leak the URL when you manipulate one::
|
||||
|
||||
$ jp file get -P "aesgcm://upload.example.org/wvgSUlURU_UPspAv/some_image.jpg#7d8509c43479591f8d8492f84369875ca983db58f43225c40229eb06d05b2037c841b2346c9642a88ba4a91aa96a0e8f"
|
||||
|
||||
upload
|
||||
======
|
||||
|
|
@ -132,6 +149,11 @@ feature).
|
|||
|
||||
As usual, you can use ``-P, --progress`` to see a progress bar.
|
||||
|
||||
You can encrypt the file using ``AES GCM`` with the ``-e, --encrypt`` argument. You will
|
||||
then get an ``aesgcm://`` link instead of the usual ``https``, this link contains the
|
||||
decryption key (in the fragment part) so be sure to not leak it and to transmit it only
|
||||
over encrypted communication channels.
|
||||
|
||||
.. _XEP-0363 (HTTP File Upload): XEP-0363: HTTP File Upload
|
||||
|
||||
example
|
||||
|
|
@ -141,6 +163,10 @@ Upload a document to a server::
|
|||
|
||||
$ jp file upload -P ~/Documents/something_interesting.odt
|
||||
|
||||
Encrypt and upload a document to server::
|
||||
|
||||
$ jp file upload -P -e ~/Documents/something_secret.odt
|
||||
|
||||
share
|
||||
=====
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue