Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion qfieldcloud_sdk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,20 @@ def delete_project(ctx: Context, project_id):
"--throw-on-error/--no-throw-on-error",
help="If any project file upload fails stop uploading the rest. Default: False",
)
@click.option(
"--force/--no-force",
help="Upload file even if it already exists remotely. Default: False",
default=False,
)
@click.pass_context
def upload_files(ctx: Context, project_id, project_path, filter_glob, throw_on_error):
def upload_files(
ctx: Context,
project_id: str,
project_path: str,
filter_glob: str,
throw_on_error: bool,
force: bool,
) -> None:
"""Upload files to a QFieldCloud project."""

files = ctx.obj["client"].upload_files(
Expand All @@ -337,6 +349,7 @@ def upload_files(ctx: Context, project_id, project_path, filter_glob, throw_on_e
filter_glob=filter_glob,
throw_on_error=throw_on_error,
show_progress=True,
force=force,
)

if ctx.obj["format_json"]:
Expand Down