0040-00000025
Problem description
The watermark image specified in the image processing request does not exist in the bucket.
Causes
OSS cannot apply a watermark using an image that is not in the bucket. The watermark image name in the x-oss-process parameter is Base64-encoded. If the decoded filename does not match any object in the bucket, the request fails.
Examples
In the following request, the oss-example bucket contains only panda.jpg and example_image.
GET /example_image?x-oss-process=image/watermark,image_cGFuZGEucG5n HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: application/xmlThe parameter value cGFuZGEucG5n is the Base64 encoding of panda.png. Because panda.png does not exist in the bucket, OSS returns an error.
To decode a Base64-encoded watermark name, run:
echo "cGFuZGEucG5n" | base64 --decode
# Output: panda.pngSolutions
Upload the missing watermark image to the bucket, or update the request to reference an image that already exists. The following example uses panda.jpg, which exists in the bucket:
GET /example_image?x-oss-process=image/watermark,image_cGFuZGEuanBn HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 03:41:49 GMT
Content-Type: application/xmlHere, cGFuZGEuanBn decodes to panda.jpg. The request succeeds and returns the watermarked image.
Always use existing watermark images for processing.