0007-00000303

更新时间:
复制 MD 格式

Problem description

Image information cannot be retrieved during upload callback processing.

Causes

The callbackBody field includes image information variables such as imageInfo.height, imageInfo.width, or imageInfo.format as callback parameters. If OSS cannot access the image when the callback runs, it cannot read those variables and the request fails.

Examples

You set imageInfo.height, imageInfo.width, or imageInfo.format in the callbackBody field when uploading an image. After the upload completes, the callback fails because OSS cannot retrieve the image metadata.

Solutions

Work through the following checks in order.

  1. Confirm the image was uploaded successfully. If the upload failed, call PutObject to upload the image again, then retry the callback.

  2. Confirm the image still exists and is accessible. Check whether a lifecycle expiration rule has removed the image, or whether another user with sufficient permissions has deleted it. Either condition makes the image inaccessible to the callback.

  3. Verify the image format is supported. OSS image processing supports JPG, PNG, BMP, GIF, WebP, TIFF, and HEIC. If the image is in a different format, OSS cannot read imageInfo.* variables and the callback fails.

  4. Test whether image metadata is retrievable. Upload the image to OSS and run x-oss-process=image/info against it:

       https://<bucket-name>.oss-<region>.aliyuncs.com/<object-key>?x-oss-process=image/info

    If this request fails, the callback will also fail for the same reason.

  5. Isolate the issue using a known-good image. If the test in step 4 fails unexpectedly, apply x-oss-process=image/info to the following public test image to verify that your OSS image processing configuration is working:

       https://image-demo.oss-cn-hangzhou.aliyuncs.com/f.jpg

    If this request returns metadata successfully, your OSS setup is functional and the problem is specific to your image file.

References