Home > Backend Development > PHP Tutorial > Video upload - Use PHP to upload videos to Alibaba Cloud oss ​​cloud server. Because the video is too large, the server will time out. How should I solve it?

Video upload - Use PHP to upload videos to Alibaba Cloud oss ​​cloud server. Because the video is too large, the server will time out. How should I solve it?

WBOY
Release: 2016-10-17 09:30:04
Original
4551 people have browsed it

The company system needs to implement a video upload function to upload local videos to oss. It is based on the yii2 framework of PHP. If I use the ordinary file upload method, the server request always times out because the video file is too large. How can I solve this problem? What

Reply content:

The company system needs to implement a video upload function to upload local videos to oss. It is based on the yii2 framework of PHP. If I use the ordinary file upload method, the server request always times out because the video file is too large. How can I solve this problem? What

Use the multi-part upload function of OSS and upload directly to Alibaba Cloud in the background instead of in the browser after the upload is successful.

And the speed of Alibaba Cloud's intranet connection to OSS is still good. It has been tested that a 500M file can be completed in two to three seconds.

Refer to this class
https://github.com/Rozbo/AliyunOSS-Driver-For-ThinkPHP3.2.X
Or you can use step-by-step upload, first upload to the server, and then synchronize to OSS.
Use
https://github.com/Rozbo/Huploadify ajax upload in the frontend and synchronize in the background.

Multi-point simultaneous transmission + interrupted transmission.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template