@@ -58,27 +58,27 @@ In this example, we'll use the `jq` tool to parse the JSON response and retrieve
5858=== ":material-bash: Bash"
5959
6060 ```bash
61- qfieldcloud-cli --json login 'ninjamaster' 'secret_password123' | jq .session_token
61+ qfieldcloud-cli --json login 'ninjamaster' 'secret_password123' | jq '.token'
6262 ```
6363
6464=== ":material-powershell: PowerShell"
6565
6666 ```powershell
67- qfieldcloud-cli --json login "ninjamaster" "secret_password123" | jq ".session_token"
67+ ( qfieldcloud-cli --json login "ninjamaster" "secret_password123" | ConvertFrom-Json).token
6868 ```
6969
7070This command will output only the session token, which can be stored in an environment variable for future use:
7171
7272=== ":material-bash: Bash"
7373
7474 ```bash
75- export QFIELDCLOUD_TOKEN=$(qfieldcloud-cli --json login 'ninjamaster' 'secret_password123' | jq -r .session_token )
75+ export QFIELDCLOUD_TOKEN=$(qfieldcloud-cli --json login 'ninjamaster' 'secret_password123' | jq -r '.token' )
7676 ```
7777
7878=== ":material-powershell: PowerShell"
7979
8080 ```powershell
81- $env:QFIELDCLOUD_TOKEN = (qfieldcloud-cli --json login "ninjamaster" "secret_password123" | jq ".session_token")
81+ $env:QFIELDCLOUD_TOKEN = (qfieldcloud-cli --json login "ninjamaster" "secret_password123" | ConvertFrom-Json).token
8282 ```
8383
8484### Create a project
@@ -181,6 +181,66 @@ To view all files in a specific project:
181181 qfieldcloud-cli list-files "123e4567-e89b-12d3-a456-426614174000"
182182 ```
183183
184+ ### Download Files for Backup
185+
186+ Download the project files for backup or just to check what is uploaded. To download all files or filter specific ones (e.g., ` .jpg ` files):
187+
188+ === ":material-bash: Bash"
189+
190+ ```bash
191+ qfieldcloud-cli download-files '123e4567-e89b-12d3-a456-426614174000' '/home/ninjamaster/backup_folder/DCIM/2024-11-10/' --filter '*.jpg'
192+ ```
193+
194+ === ":material-powershell: PowerShell"
195+
196+ ```powershell
197+ qfieldcloud-cli download-files "123e4567-e89b-12d3-a456-426614174000" "C:\Users\ninjamaster\backup_folder\DCIM\2024-11-10\" --filter "*.jpg"
198+ ```
199+
200+ If files already exist locally and you want to overwrite them, use the ` --force-download ` option:
201+
202+ === ":material-bash: Bash"
203+
204+ ```bash
205+ qfieldcloud-cli download-files '123e4567-e89b-12d3-a456-426614174000' '/home/ninjamaster/backup_folder/DCIM/2024-11-10/' --force-download
206+ ```
207+
208+ === ":material-powershell: PowerShell"
209+
210+ ```powershell
211+ qfieldcloud-cli download-files "123e4567-e89b-12d3-a456-426614174000" "C:\Users\ninjamaster\backup_folder\DCIM\2024-11-10\" --force-download
212+ ```
213+
214+ ### Delete Files to Save Space
215+
216+ To free up storage on QFieldCloud, you can delete unnecessary files, such as ` .jpg ` files:
217+
218+ === ":material-bash: Bash"
219+
220+ ```bash
221+ qfieldcloud-cli delete-files '123e4567-e89b-12d3-a456-426614174000' --filter '*.jpg'
222+ ```
223+
224+ === ":material-powershell: PowerShell"
225+
226+ ```powershell
227+ qfieldcloud-cli delete-files "123e4567-e89b-12d3-a456-426614174000" --filter "*.jpg"
228+ ```
229+
230+ You can also delete specific files by specifying their exact path:
231+
232+ === ":material-bash: Bash"
233+
234+ ```bash
235+ qfieldcloud-cli delete-files '123e4567-e89b-12d3-a456-426614174000' 'DCIM/tree-202411202334943.jpg'
236+ ```
237+
238+ === ":material-powershell: PowerShell"
239+
240+ ```powershell
241+ qfieldcloud-cli delete-files "123e4567-e89b-12d3-a456-426614174000" "DCIM\tree-202411202334943.jpg"
242+ ```
243+
184244### Manage Members and Collaborators
185245
186246The collaborative nature of QFieldCloud naturally involves other people in the fieldwork.
@@ -375,10 +435,10 @@ Suppose your company packages the project every morning at 8:47 AM.:
375435
376436 This triggers the package job daily at the specified time. For more information about [schtasks](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks).
377437
378-
379438### Download Files for Backup
380439
381- Once the package job is complete, download the project files for backup. To download all files or filter specific ones (e.g., ` .jpg ` files):
440+ Once the package job is complete, you may want to check what files are used by QField.
441+ To download all files or filter specific ones (e.g., ` .jpg ` files):
382442
383443=== ":material-bash: Bash"
384444
@@ -404,37 +464,6 @@ If files already exist locally and you want to overwrite them, use the `--force-
404464
405465 ```powershell
406466 qfieldcloud-cli package-download "123e4567-e89b-12d3-a456-426614174000" "C:\Users\ninjamaster\backup_folder\DCIM\2024-11-10\" --force-download
407- ```
408-
409- ### Delete Files to Save Space
410-
411- To free up storage on QFieldCloud, you can delete unnecessary files, such as ` .jpg ` files:
412-
413- === ":material-bash: Bash"
414-
415- ```bash
416- qfieldcloud-cli delete-files '123e4567-e89b-12d3-a456-426614174000' --filter '*.jpg'
417- ```
418-
419- === ":material-powershell: PowerShell"
420-
421- ```powershell
422- qfieldcloud-cli delete-files "123e4567-e89b-12d3-a456-426614174000" --filter "*.jpg"
423- ```
424-
425- You can also delete specific files by specifying their exact path:
426-
427- === ":material-bash: Bash"
428-
429- ```bash
430- qfieldcloud-cli delete-files '123e4567-e89b-12d3-a456-426614174000' 'DCIM/tree-202411202334943.jpg'
431- ```
432-
433- === ":material-powershell: PowerShell"
434-
435- ```powershell
436- qfieldcloud-cli delete-files "123e4567-e89b-12d3-a456-426614174000" "DCIM\tree-202411202334943.jpg"
437- ```
438467
439468### Delete a Project
440469
0 commit comments