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
Gokapi also has a CLI tool that allows uploads from the command line. Binaries are avaible on the release page (``gokapi-cli``) for Linux, Windows and MacOs. To compile it yourself, download the repository and run ``make build-cli`` in the top directory.
213
+
Gokapi also has a CLI tool that allows uploads from the command line. Binaries are avaible on the `Github release page <https://github.com/Forceu/Gokapi/releases>`_ for Linux, Windows and MacOS. To compile it yourself, download the repository and run ``make build-cli`` in the top directory.
214
+
215
+
Alternatively you can use the tool with Docker, although it will be slightly less user-friendly.
216
+
217
+
.. note::
218
+
219
+
Gokapi v2.1.0 or newer is required to use the CLI tool.
214
220
215
221
Login
216
222
=================================
217
223
218
224
First you need to login with the command ``gokapi-cli login``. You will then be asked for your server URL and a valid API key with upload permission. If end-to-end encryption is enabled, you will also need to enter your encyption key. By default the login data is saved to ``gokapi-cli.json``, but you can define a different location with the ``-c`` parameter.
219
225
226
+
220
227
To logout, either delete the configuration file or run ``gokapi-cli logout``.
221
228
222
229
.. warning::
223
230
224
231
The configuration file contains the login data as plain text.
225
232
226
233
234
+
Docker
235
+
---------------------------------
236
+
237
+
If you are using Docker, your config will always be saved to ``/app/config/config.json`` and the location cannot be changed. To login, execute the following command:
238
+
239
+
docker run -it --rm -v gokapi-cli-config:/app/config docker.io/f0rc3/gokapi-cli:latest login
240
+
241
+
The volume ``gokapi-cli-config:/app/config`` is not required if you re-use the container, but it is still highly recommended. If the volume is not mounted, you will need to log in again after every new container creation.
242
+
243
+
244
+
227
245
Upload
228
246
=================================
229
247
@@ -244,11 +262,40 @@ To upload a file, simply run ``gokapi-cli upload -f /path/to/file``. By default
244
262
| -c [path] | Use the configuration file specified |
If you are using end-to-end encryption, do not upload other encrypted files simultaneously to avoid race conditions.
251
274
275
+
276
+
277
+
Docker
278
+
---------------------------------
279
+
280
+
As a Docker container cannot access your host files without a volume, you will need to mount the folder that contains your file to upload and then specify the internal file path with ``-f``. If no ``-f`` parameter is supplied and only a single file exists in the container folder ``/upload/``, this file will be uploaded.
281
+
282
+
Example: Uploading the file ``/tmp/example``. It will expire after 5 downloads, has no time expiry and has no password.
0 commit comments