1

I'm trying to upload video file in aliyun OSS bucket as you know video are big in size so in that case page start to loading and keep loading until file upload successfully.

Can I make it asynchronously, when I send the request to aliyun it will start a background process instead of keep loading the page.

Here is code

try {
    $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
    $ossClient->multiuploadFile($bucket, $object, $filePath);
} catch (OssException $e) {
    print $e->getMessage();
}

Thanks

Hassan Ejaz
  • 183
  • 2
  • 16

1 Answers1

0

Since that is something you will be doing on the front-end to process and upload the files in the background to Aliyun OSS bucket you may have to use a modern approach - there are a lot of file upload scripts written in JavaScript readily available.

You may want to check this thread to learn how to build a setup to upload files asynchronously: How can I upload files asynchronously?

Next, to complement the file upload you have to handle the asynchronous request on the back-end as well.

Deepak Kamat
  • 1,880
  • 4
  • 23
  • 38