Parameters cannot be obtained for asynchronous audio/video processing callback of upyun.

Source: Internet
Author: User
After asynchronous audio and video processing, the callback function always obtains the POST parameter. {Code...} although the callback failed to get the parameter, the execution was successful and the file was also processed. How can this problem be solved? After asynchronous audio and video processing, the callback function always obtains the POST parameter.

Function actionVideoProcessCallback () {/*** method provided by the official SDK. after execution, the verification fails because the parameter is null. */$ Av = new AvPretreatment ('XXX', 'XXX'); $ validation = new CallbackValidation ($ av); if ($ validation-> verifySign ()) {echo 'verification successfully';} else {echo 'verification failed';}/*** cannot be obtained directly through POST. */$ Status_code = $ _ POST ['status _ Code']; // status code of the integer processing result, 200 indicates that $ bucket_name =$ _ POST ['bucket _ name']; $ signature =$ _ POST ['signature']; $ path = $ _ POST ['path']; // save path of the array output file $ description = $ _ POST ['description']; // string processing result description $ task_id = $ _ POST ['task _ id']; // task ID corresponding to the task // Get progress // $ sugar = new AvPretreatment ('XXX', 'XXX '); // operator's account password // $ result = $ sugar-> getTasksStatus ($ task_id, 'XXX ');}

Although the callback fails to get the parameter, the execution is successful and the file is also processed.

How can this problem be solved?

Reply content:

After asynchronous audio and video processing, the callback function always obtains the POST parameter.

Function actionVideoProcessCallback () {/*** method provided by the official SDK. after execution, the verification fails because the parameter is null. */$ Av = new AvPretreatment ('XXX', 'XXX'); $ validation = new CallbackValidation ($ av); if ($ validation-> verifySign ()) {echo 'verification successfully';} else {echo 'verification failed';}/*** cannot be obtained directly through POST. */$ Status_code = $ _ POST ['status _ Code']; // status code of the integer processing result, 200 indicates that $ bucket_name =$ _ POST ['bucket _ name']; $ signature =$ _ POST ['signature']; $ path = $ _ POST ['path']; // save path of the array output file $ description = $ _ POST ['description']; // string processing result description $ task_id = $ _ POST ['task _ id']; // task ID corresponding to the task // Get progress // $ sugar = new AvPretreatment ('XXX', 'XXX '); // operator's account password // $ result = $ sugar-> getTasksStatus ($ task_id, 'XXX ');}

Although the callback fails to get the parameter, the execution is successful and the file is also processed.

How can this problem be solved?

You can read this document and directly write it into the callback. Callback notification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.