All Products
Search
Document Center

Object Storage Service:synchronous processing

Last Updated:Jan 02, 2025

You can specify the x-oss-process field to execute a processing task in synchronous mode. In this mode, an application cannot proceed to execute another task until the current task is completed. Synchronous processing is suitable for tasks of which results are returned in an efficient manner, such as image processing and document processing.

Operations that support synchronous processing

Note

You must replace the asterisk (*) in the operation name described in the following table with the actual data processing parameter. For example, you can specify x-oss-process=image/resize to resize images.

Feature

Operation

References

Methods

Image processing

x-oss-process=image/*

IMG parameters

  • URLs of files

  • Alibaba Cloud SDK

  • RESTful APIs

Document processing

x-oss-process=doc/*

  • Alibaba Cloud SDK

  • RESTful APIs

Media processing

  • Video: x-oss-process=video/*

  • Audio: x-oss-process=audio/*

Image intelligence ( except decoding blind watermarks)

x-oss-process=image/*

Image intelligence

FAQ

Can I perform multiple operations simultaneously in synchronous mode?

  • When you execute a synchronous processing task in which anonymous access is allowed, such as an image processing task, you can add multiple processing parameters to the URL to perform operations simultaneously.

    You can resize the image and add watermarks by using the following URL .

    https://examplebucket.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/resize,w_300,h_300/watermark,image_cGFuZGEucG5n,t_90
  • When you execute a synchronous processing task in which anonymous access is not allowed, such as a document processing task, you can use Object Storage Service (OSS) SDKs and add multiple processing parameters to perform operations simultaneously.

    The following code provides an example of how to convert the format and capture a snapshot of a document by adding parameters and using OSS SDK for Java.

    getObjectRequest.setProcess("doc/convert,target_jpg,source_docx/snapshot,target_jpg,source_docx,page_2");

Reference

For more information about how to save processed files in OSS, see Save As.