After an object is uploaded, OSS can start a callback process for the application server. To request callback, you need only to send a request that contains relevant callback parameters to OSS.
Upload callback is used together with authorized third-party upload. When you upload an object to OSS, the client requests a callback to the server. After OSS completes 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 OSS receives the response, OSS returns the upload status to the client.
When OSS sends 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 you send 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 process describes how to implement upload callback:
|Java SDK||SDK demos for various programming languages|