SuperAPI AI Directory

dogecloud-oss

Coding & development

View repository

Updated 10-15 20:08

About this skill

Duoji Cloud OSS

When writing, modifying, or troubleshooting code, use the official Duoji Cloud documentation to quickly select the correct SDK, upload method, and API, and complete a minimal, secure, and maintainable OSS integration. Prioritize reusing the project's existing framework, HTTP client, and S3 SDK.

Choose the integration path

  1. First check the project language, framework, dependencies, and existing network/upload code, then confirm whether this task requires upload, temporary credentials, Bucket, file management, remote fetching, or statistics capabilities.
  2. Direct upload from browser, Android, or iOS clients: read references/client-upload.md, and have the business server issue temporary credentials.
  3. WeChat Mini Program or uni-app: read the same client reference, use the platform's uploadFile flow, and do not copy the browser S3 SDK.
  4. Server-side upload or file management: read references/server-sdks.md, and choose the official SDK corresponding to the project language; for small files, the simple upload API may also be used.
  5. When there is no suitable SDK, or Bucket/file/statistics APIs or signature troubleshooting are needed: read references/api-reference.md。
  6. When building an image hosting service, also read references/image-hosting.md。

Only read the reference required for the current task. Before implementation, open the official pages linked there and verify fields, limits, and examples; do not invent parameters from memory.

Coding workflow

  1. Find the reference corresponding to the current task, and open only the directly relevant official pages within it.
  2. Choose the SDK or REST API according to the project's existing technology stack; do not replace the framework already chosen by the user, and do not add unnecessary dependencies.
  3. Verify the installation method, initialization parameters, request fields, response fields, limits, and error handling from the official pages.
  4. Directly modify or generate runnable code, and follow the repository's configuration, types, error handling, and testing style.
  5. For client-side uploads, have the server issue least-privilege temporary credentials; for server-side management, use the corresponding language SDK or API.
  6. Run a minimal verification for authentication, key/scope generation, signing, upload, or pagination logic.
  7. In the delivery, point out the official pages used, the environment variables that need to be configured, and the Bucket or access domain that the user still needs to provide.

Security boundaries

  • Never write permanent credentials into clients, repositories, logs, example responses, or error messages.
  • Temporary credentials have a maximum validity period of 2 hours; use them according to the response expiration time, and do not extend them yourself or cache them for a long time.
  • Do not hardcode s3Bucket or s3Endpoint; they may change, so use the current response from the temporary credential API.
  • By default, clients should be granted only a single object key; grant a user-isolated narrow prefix only when batch upload is truly required. Do not use *。
  • Complete business identity authentication, permission checks, rate limiting, and key ownership verification before issuing temporary credentials.
  • Validate file size, extension/MIME allowlist, and the generated key on the server; do not trust client filenames or MIME.
  • Listing, copying, deleting, and downloading are placed on the server by default. Only when the user explicitly needs client-side management should the minimal allowActions。
  • Keep explicit confirmation and error handling for irreversible operations such as lifecycle deletion.
  • Do not disable TLS certificate verification, and do not treat demo placeholder credentials in official examples as runnable configuration.

Output requirements

  • Prefer to directly provide or complete the integration code, and attach the official documentation links actually used.
  • Clearly list the environment variables, Bucket, CDN/custom domain, and CORS/platform valid domains that the user needs to configure.
  • Do not claim that a Bucket, domain, or credentials have been created unless actual tool results prove that they have been completed.
  • When the documentation conflicts with the project's dependency version, first check the dependency's current official documentation, then adapt to the S3-compatible parameters returned by Duoji Cloud.