Last modified by Dennis Segebarth on 2024/10/02 18:38

From version 1.8
edited by Susan Evans
on 2023/07/10 22:26
Change comment: (Autosaved)
To version 1.9
edited by Susan Evans
on 2023/07/10 22:28
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -622,9 +622,83 @@
622 622  $ pilotcli file upload -p <path> <file> --output-path test_manifest.json
623 623  {{/code}}
624 624  
625 +== Command: **resume** ==
625 625  
627 +* **Options**: -td ~-~-thread, -r ~-~-resumable-manifest
628 +* **Usage**: Resume unfinished file uploading based on the manifest file.
629 +* (((
630 +**Prerequisite**:
626 626  
632 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
633 +* Project must be accessible to the user, otherwise an error is returned: "Project Code not found in list. Please verify and try again."
634 +* The resumable manifest JSON file is required, which is generated upon executing the {{code}}pilotcli file upload{{/code}} command.
635 +)))
627 627  
637 +=== Example: ===
638 +
639 +For instance upon disconnecting from the internet, or by accidentally closing the terminal, a currently running uploading process can be aborted. You can use the {{code}}pilotcli file resume{{/code}} command in order to resume the uploading process right where you left off. Simply point to the manifest JSON file that was created upon executing the original upload command. Please note that the source files still have to be in the same location, otherwise resuming the uploading process will fail.
640 +
641 +{{code language="none"}}
642 +$ pilotcli file resume -r ./manifest.json
643 +Resume the upload for 10 files.
644 +Resumable upload check complete.
645 +Uploading aggregated.py: |██████████████████████████████ 100% 00:00
646 +Uploading __init__.py: |██████████████████████████████ 100% 00:00
647 +Uploading service_meta_class.py: |██████████████████████████████ 100% 00:00
648 +Uploading upload_form.py: |██████████████████████████████ 100% 00:00
649 +Uploading convert_type.py: |██████████████████████████████ 100% 00:00
650 +Uploading singleton.py: |██████████████████████████████ 100% 00:00
651 +Uploading __init__.py: |██████████████████████████████ 100% 00:00
652 +Uploading base_library.zip: |██████████████████████████████ 100% 00:00 0% ?
653 +Uploading EXE-00.toc: |██████████████████████████████ 100% 00:00
654 +Uploading xref-pilotcli_test20230227_3.html: |██████████████████████████████ 100% 00:00
655 +Upload Time: 11.13s for 10 files
656 +{{/code}}
657 +
658 +== Command: **sync** ==
659 +
660 +* **Usage**: Download a file or a folder from a Project. If pilotcli is used outside of the Platform, e.g. the users local machine, users can only download from Project’s Core. When pilotcli is used within the Platform, e.g. from one of the workspace tools, users will also be able to download from the Green Room of a Project as well.
661 +* (((
662 +**Options**: -z ~-~-zone, -i ~-~-geid, ~-~-zip
663 +
664 +* To look up a file’s geid, or unique file ID, open the Project File Explorer in the Portal and inspect the File Properties for the ID.
665 +)))
666 +* (((
667 +**Prerequisite**:
668 +
669 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue."
670 +* The specified file or folder must exist, otherwise an error is returned: “File does not exist or source file provided is invalid: folder_name/file_name.”
671 +* If the user has no access to the specified file or folder on the Portal, an error is returned: “Permission denied. Please verify that your role in the Project has permission to perform this action.”
672 +)))
673 +
674 +{{code language="none"}}
675 +$ pilotcli file sync --help
676 +Usage: pilotcli file sync [OPTIONS] [PATHS]... OUTPUT_PATH
677 +
678 + Download files/folders from a given Project/folder/file in core zone.
679 +
680 +Options:
681 + -z, --zone TEXT Target Zone (i.e., core/greenroom)
682 + --zip Download files as a zip.
683 + -i, --geid Enable downloading by geid.
684 + --help Show this message and exit.
685 +{{/code}}
686 +
687 +=== Examples ===
688 +
689 +Download a file or a folder from the Core zone of a Project:
690 +
691 +{{code language="none"}}
692 +$ pilotcli file sync cli/admin/sample_file2 -z core ~/Downloads/
693 +Preparing status: READY_FOR_DOWNLOADING
694 +start downloading...
695 +Downloading sample_file2 |██████████████████████████████ 100% 00:00
696 +File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2
697 +{{/code}}
698 +
699 +Download multiple files or folders as a compressed zip by simply providing all source files or folders and adding the ~-~-zip option:
700 +
701 +
628 628  ----
629 629  
630 630  -
... ... @@ -634,5 +634,5 @@
634 634  
635 635  Copyright © 2023 [[Indoc Research>>url:https://www.indocresearch.org/]].
636 636  
637 -HealthDataCloud is powered by Pilot technology, a product of [[Indoc Research>>url:https://www.indocresearch.org/]].~{~{/code}}
638 -~)~)~)
711 +HealthDataCloud is powered by Pilot technology, a product of [[Indoc Research>>url:https://www.indocresearch.org/]].{{/code}}
712 +