Skip to main content

Overview

Copies nothing — the file must already exist under ~/.moorcheh/uploads. The CLI maps the host path to /uploads/... and calls POST /namespaces/{namespace_name}/files. Poll progress with moorcheh file-job-status.

Synopsis

moorcheh upload-file --namespace-name NAME --file PATH \
  [--force-reindex] [--metadata-json JSON] [--base-url URL]

Options

FlagRequiredDescription
--namespace-nameYesTarget text namespace
--fileYesHost path to a file under ~/.moorcheh/uploads
--force-reindexNoReplace index even if size/mtime unchanged
--metadata-jsonNoJSON object merged into chunk metadata
--base-urlNoDefault http://localhost:8080

Examples

# Copy a file into the upload dir first
copy C:\Users\you\Documents\document.pdf %USERPROFILE%\.moorcheh\uploads\

moorcheh upload-file --namespace-name my-documents --file "%USERPROFILE%\.moorcheh\uploads\document.pdf"

moorcheh file-job-status --namespace-name my-documents --job-id <job_id>
moorcheh upload-file --namespace-name my-documents \
  --file ~/.moorcheh/uploads/document.pdf \
  --force-reindex \
  --metadata-json '{"department":"engineering"}'

Batch upload from JSON

Use moorcheh upload-files with a JSON file whose files[].path values are container paths (/uploads/...). See API: Upload file.