Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
3093:d909473a76cc | 3094:c3cb18236bdf |
---|---|
116 Several files are expected from Louise, accept them and store them do | 116 Several files are expected from Louise, accept them and store them do |
117 ``~/Downloads/Louise``:: | 117 ``~/Downloads/Louise``:: |
118 | 118 |
119 $ jp file receive --multiple --path ~/Downloads/Louise louise@example.org | 119 $ jp file receive --multiple --path ~/Downloads/Louise louise@example.org |
120 | 120 |
121 get | |
122 === | |
123 | |
124 Download a file from an URI. This commands handle URI scheme common with XMPP, so in | |
125 addition to ``http`` and ``https``, you can use it with ``aesgcm`` scheme (encrypted files | |
126 with key in URL, this is notably used with OMEMO encryption). | |
127 | |
128 As usual, you can use ``-P, --progress`` to see a progress bar. | |
129 | |
130 example | |
131 ------- | |
132 | |
133 Download an encrypted file with a progress bar, and save it to current working directory | |
134 with the same name as in the URL (``some_image.jpg``). The URL fragment part (after ``#``) | |
135 is used for decryption, so be sure to not leak the URL when you manipulate one:: | |
136 | |
137 $ jp file get -P "aesgcm://upload.example.org/wvgSUlURU_UPspAv/some_image.jpg#7d8509c43479591f8d8492f84369875ca983db58f43225c40229eb06d05b2037c841b2346c9642a88ba4a91aa96a0e8f" | |
121 | 138 |
122 upload | 139 upload |
123 ====== | 140 ====== |
124 | 141 |
125 Upload a file to your XMPP server (or an other entity if specified). The upload will be | 142 Upload a file to your XMPP server (or an other entity if specified). The upload will be |
130 of the service to upload too (by default, this is autodetected if your server offers this | 147 of the service to upload too (by default, this is autodetected if your server offers this |
131 feature). | 148 feature). |
132 | 149 |
133 As usual, you can use ``-P, --progress`` to see a progress bar. | 150 As usual, you can use ``-P, --progress`` to see a progress bar. |
134 | 151 |
152 You can encrypt the file using ``AES GCM`` with the ``-e, --encrypt`` argument. You will | |
153 then get an ``aesgcm://`` link instead of the usual ``https``, this link contains the | |
154 decryption key (in the fragment part) so be sure to not leak it and to transmit it only | |
155 over encrypted communication channels. | |
156 | |
135 .. _XEP-0363 (HTTP File Upload): XEP-0363: HTTP File Upload | 157 .. _XEP-0363 (HTTP File Upload): XEP-0363: HTTP File Upload |
136 | 158 |
137 example | 159 example |
138 ------- | 160 ------- |
139 | 161 |
140 Upload a document to a server:: | 162 Upload a document to a server:: |
141 | 163 |
142 $ jp file upload -P ~/Documents/something_interesting.odt | 164 $ jp file upload -P ~/Documents/something_interesting.odt |
143 | 165 |
166 Encrypt and upload a document to server:: | |
167 | |
168 $ jp file upload -P -e ~/Documents/something_secret.odt | |
169 | |
144 share | 170 share |
145 ===== | 171 ===== |
146 | 172 |
147 Subcommands for advanced file sharing. Please check :ref:`jp-file_share`. | 173 Subcommands for advanced file sharing. Please check :ref:`jp-file_share`. |