Problem description
Files of the Archive Storage class in Alibaba Cloud Object Storage Service (OSS) cannot be downloaded. The download button for these files is grayed out.
Problem cause
Files uploaded to OSS inherit the storage class of the bucket. A file is assigned the Archive Storage class for one of the following reasons:
-
The bucket uses the Standard storage class, but the storage class for the file was set to Archive Storage in the code when the file was uploaded.
-
The bucket uses the Archive Storage class. The uploaded file then inherits this storage class from the bucket.
Solutions
To download archived files, you can perform the following steps:
-
Restore the file: Call the RestoreObject operation to restore the file. After the file is restored, you can download it. For more information, see Restore objects.
-
Enable real-time access: Enable real-time access of Archive objects for the bucket. You can then directly download the file. This feature applies to all objects of the Archive Storage class in the bucket. For more information, see Real-time access of Archive objects.