Doge Upload Public Info
Use the bundled uploader script to upload a local file with DogeCloud temporary credentials and print machine-readable public access info.
Read references/dogecloud-oss.md when API details are needed.
Quick Start
- Export environment variables (camelCase or
DOGECLOUD_*both supported):accessKey/DOGECLOUD_ACCESS_KEYsecretKey/DOGECLOUD_SECRET_KEYbucket/DOGECLOUD_BUCKET(bucket name ors3Bucket)endpoint/DOGECLOUD_ENDPOINTpublicBaseUrl/DOGECLOUD_PUBLIC_BASE_URLprefix/DOGECLOUD_PREFIX
- Install dependencies:
python3 -m pip install -U boto3 requests
- Run:
python3 scripts/doge_upload_public_info.py ./local/file.jpg
Workflow
- Resolve bucket from env/CLI (support bucket name or
s3Bucket). - Resolve upload key from
--key, otherwise useprefix/<local-filename>. - Request temporary credentials from
/auth/tmp_token.jsonusing scoped permissions. - Upload file with Boto3 S3 client and returned
s3Bucket+s3Endpoint. - Return JSON with upload metadata and public URL candidates.
Output Contract
Return a JSON object with:
bucket,s3_bucket,s3_endpoint,object_keyfilemetadata (path,size_bytes,md5)tmp_tokenmetadata (channel,expired_at)public_info:primary_urlcandidates(custom domain, derived test domain, and S3 endpoint style candidate)notes
Guardrails
- Keep permanent AccessKey/SecretKey on server side only.
- Default to
OSS_UPLOADfor least privilege; useOSS_FULLonly when explicitly required. - If required env vars are missing, fail fast and print a clear reminder listing all missing keys.
- Warn that test domains ending with
.oss.dogecdn.comcan expire (commonly after 30 days). - Prefer
--public-base-urlwhen the user requests a production-ready public URL.
Resources
scripts/
scripts/doge_upload_public_info.py: upload and public-info extractor CLI.
references/
references/dogecloud-oss.md: minimal API notes and URL caveats from official docs.