-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi
I checked BunnyAPI.php file and found at line 100 this code
if ($url_type === 'BASE') {//General CDN
curl_setopt($curl, CURLOPT_URL, self::API_URL . $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Accept: application/json", "AccessKey: $this->api_key", "Content-Type: application/json"));
} elseif ($url_type === 'STORAGE') {//Storage zone
curl_setopt($curl, CURLOPT_URL, self::STORAGE_API_URL . $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("AccessKey: $this->access_key"));
} else {//Video stream
curl_setopt($curl, CURLOPT_URL, self::VIDEO_STREAM_URL . $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("AccessKey: " . $this->stream_library_access_key, "Content-Type: application/*+json"));
if ($method === "PUT") {
curl_setopt($curl, CURLOPT_POSTFIELDS, file_get_contents($params['file']));
}
}As I see it uses file_get_contents to send the file, which stores the file first in memory
This can't work with large files
May I ask why don't you make it like storage to use CURLOPT_INFILE?
And thanks for the great package!
Metadata
Metadata
Assignees
Labels
No labels