diff --git a/artdag.py b/artdag.py index 6d274fd..564a8a0 100755 --- a/artdag.py +++ b/artdag.py @@ -519,7 +519,7 @@ def import_file(filepath): @cli.command() @click.argument("filepath", type=click.Path(exists=True)) def upload(filepath): - """Upload a file to cache (works with remote servers). Requires login.""" + """Upload a file to cache and IPFS. Requires login.""" # Check auth token_data = load_token() if not token_data.get("access_token"): @@ -536,8 +536,11 @@ def upload(filepath): sys.exit(1) resp.raise_for_status() result = resp.json() - click.echo(f"Uploaded: {result['content_hash']}") + click.echo(f"CID: {result['cid']}") click.echo(f"Size: {result['size']} bytes") + click.echo() + click.echo("Use in recipes:") + click.echo(f' (asset my-asset :cid "{result["cid"]}")') except requests.RequestException as e: click.echo(f"Upload failed: {e}", err=True) sys.exit(1)