Skip to content

Commit

Permalink
Update UploadProcessor.php (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmugam001 authored Jun 13, 2024
1 parent db2b64f commit 23230fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion filestack/UploadProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ public function registerUploadTask($api_key, $metadata)
$this->appendData($data, 'size', $metadata['filesize']);
$this->appendData($data, 'store_location', $metadata['location']);
$this->appendData($data, 'store_path', $metadata['path']);
$this->appendData($data, 'multipart', true);

$max_part_size = FilestackConfig::UPLOAD_PART_SIZE;
$num_parts = ceil($metadata['filesize'] / $max_part_size);

if ($num_parts > 1) {
$this->appendData($data, 'multipart', true);
}

array_push($data, ['name' => 'files',
'contents' => '',
Expand Down

0 comments on commit 23230fd

Please sign in to comment.