FAQ about upload

Updated at: 2024-12-12 02:32

FAQ:

What is the difference between instant file upload and instant file upload by using the pre-hashing feature?

  • Before Drive and Photo Service performs instant file upload for a file, the server calculates the SHA-1 hash value of the entire file. The server confirms whether this SHA-1 hash value matches one of the SHA-1 hash values that the server calculated before. If this SHA-1 hash value does match, the server can instantly upload the file.

  • The calculation for the SHA-1 hash value of a large file is time-consuming. Therefore, the server can obtain the SHA-1 hash value of the first 1 KB data of the large file and confirm whether this SHA-1 hash value matches one of the SHA-1 hash values that the server calculated before. If this SHA-1 hash value does not match, the large file cannot be instantly uploaded. If this SHA-1 hash value does match, the server calculates the SHA-1 hash value of the entire file and determines whether to instantly upload the file based on the match result of the entire SHA-1 hash value. This pre-hashing feature saves time and computing capacity for instant file upload.

Why is the storage usage of a drive not immediately updated after a file is uploaded to the drive?

  • Drive and Photo Service asynchronously updates the storage usage of a drive. The result may be returned with a latency of 2 to 3 seconds.

What objects does the instant file upload feature support?

  • Drive and Photo Service supports the instant file upload feature at the file level. After a file is uploaded, the Drive and Photo Service server calculates and saves the SHA-1 hash value of the file. The instant file upload feature supports files with the same SHA-1 hash value.

Does Drive and Photo Service support resumable upload?

  • Yes, Drive and Photo Service supports resumable upload. If you want to perform resumable upload for a file, you can split the file into multiple parts. The finest granularity supported by the resumable upload feature is a part of the file. You cannot perform resumable upload for a single part.

What are the common causes of upload failures?

  • If your domain is in hosting mode, invalid cross-origin resource sharing (CORS) rules may result in a upload failure. Check whether the CORS rules configured for your Object Storage Service (OSS) bucket are valid.

  • An upload failure may occur due to the full storage usage of your drive. The error code returned for this cause is QuotaExhausted.

    Feedback