After an object is uploaded, OSS can start a callback process for the application server. To request callback, you only need to send a request that contains relevant callback parameters to OSS.
Upload callback is typically used together with authorized third-party uploads. When uploading an object to OSS, the client requests a callback to the server. After completing the upload task of the client, OSS automatically sends an HTTP request for the callback to the application server to notify the server that the upload is completed. Then, the server performs operations such as modifying the database and responds to the callback request. After receiving the response, OSS returns the upload status to the client.
When sending a POST callback request to the application server, OSS includes parameters in the POST request body to carry specific information. Such parameters are divided into two types: system-defined parameters such as the bucket name and the object name, and user-defined parameters. You can specify user-defined parameters based on the application logic when sending a request that contains callback parameters to OSS. You can use user-defined parameters to carry information relevant to the application logic, such as the ID of the user who sends the request. For more information about how to use user-defined parameters, see Callback.
You can properly use upload callback to simplify the client logic and save network resources. The following figure shows the process.
- The following regions support upload callback: regions in Mainland China, Hong Kong, Singapore, Australia (Sydney), US (Virginia), US (Silicon Valley), Japan (Tokyo), Germany (Frankfurt), and UAE (Dubai).
- Currently, only simple upload (through the PutObject API), form upload (through the PostObject API), and multipart upload (through the CompleteMultipartUpload API) support upload callback.