diff doc/jp/file.rst @ 3094:c3cb18236bdf

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
author Goffi <goffi@goffi.org>
date Fri, 20 Dec 2019 12:28:04 +0100
parents 72583524cfd3
children
line wrap: on
line diff
--- a/doc/jp/file.rst	Fri Dec 20 12:28:04 2019 +0100
+++ b/doc/jp/file.rst	Fri Dec 20 12:28:04 2019 +0100
@@ -118,6 +118,23 @@
 
   $ 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 @@
 
 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 @@
 
   $ 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
 =====