How to Determine Whether the HarmonyOS Development Environment Is Compatible?
The COS SDK currently supports HarmonyOS-NEXT-DB1 with API 12, and future stable versions of HarmonyOS will also be continuously supported.
What Should I Do If I Encounter an 'Unsupported upload type' Error During Upload?
The issue may arise because the uploaded ArrayBuffer was not created in the arkTs environment (for example, it was created in a C++ environment), leading to inaccurate type determination in the SDK. To resolve this, create an ArrayBuffer in the arkTs environment, copy the ArrayBuffer passed from C++ into it, and then proceed with the upload.
The Client Network Is Functioning Normally, but Accessing COS via HTTP Is Extremely Slow or Returns a "Connection reset" Error. How to Address This Issue?
Some regional ISPs may hijack COS domain names, thus it is recommended to access COS via HTTPS.
When the multipart upload completion interface is called, the request did not include the etag information, causing a 400 BadRequest error. How should this issue be resolved?
The network may be filtering the Etag header, causing the SDK to fail to parse the corresponding parameters after chunks are uploaded, which results in the SDK reporting an error when finalizing the chunked upload.
Upload Progress Reaches 100%, but the onFailed Interface Is Ultimately Called Back. How Should This Be Handled?
The upload progress here only indicates the progress of the SDK writing data to the network. 100% does not mean the upload is complete; only the onSuccess callback indicates a successful upload. If an exception occurs when the final Complete Multipart Upload request is sent, the onFailed callback will be triggered to indicate upload failure. You can refer to the information in the onFailed callback to identify specific exceptions and solutions.
When encountering errors such as 400 BadRequest or 409 Conflict during chunked uploads, how to handle them?
It is recommended to use the advanced interfaces provided by the SDK for uploading and downloading. Avoid encapsulating the multipart upload interface yourself, as this can easily lead to errors.
How to Handle Permission Issues Reported During Advanced Upload and Download?
When advanced file downloads are used, a Head operation is performed first, thus requiring authorization for both HeadObject and GetObject permissions. For uploads, permissions for all APIs related to simple uploads and multipart uploads are required.
When errors such as INVALID_CREDENTIALS or signature expiration are encountered during API calls, how should they be resolved?
Please check whether the temporary key is updated promptly in the callback for obtaining it and whether the key is valid. If using a temporary key, you must include the token.
Error During Upload: calculate md5 Error, How To Resolve This
The issue may be that you modified the file during the upload process, causing a change in the file's MD5 checksum, or encountered poor network conditions leading to packet reception errors on the server side.
The request returns a DATA_FORMAT error. How should I handle it?
The issue may be that you are accessing COS through a proxy, but the proxy failed to forward correctly and directly returned an incorrect response packet, causing the SDK to encounter a parsing error. You can capture packets to check whether the response packets received by the client are normal.
How to Handle 403 Permission Error When the API is Called
Permission issues are generally not caused by the SDK. Please verify your authorization information. You can also contact us for assistance.