filestack/UploadProcessor.php
protected function buildChunkData($part, $chunk_data)
    {
        $data = [];
        $this->appendData($data, 'apikey',            $part['api_key']);
        $this->appendData($data, 'uri',               $part['uri']);
        $this->appendData($data, 'region',            $part['region']);
        $this->appendData($data, 'upload_id',         $part['upload_id']);

        $this->appendData($data, 'part',              $part['part_num']);
        $this->appendData($data, 'store_location',    $part['location']);
        $this->appendData($data, 'md5',               $chunk_data['md5']);
        $this->appendData($data, 'size',              $chunk_data['size']);

        if ($this->intelligent) {
            $this->appendData($data, 'multipart', true);
            $this->appendData($data, 'offset', $chunk_data['offset']);
        }

        $this->appendSecurity($data);

        array_push($data, [
            'name'      => 'files',
            'contents'  => '',
            'filename'  => $part['filename']]);

        return $data;
    }
protected function buildChunkData($part, $chunk_data)
    {
        $data = [];
        $this->appendData($data, 'apikey',            $part['api_key']);
        $this->appendData($data, 'uri',               $part['uri']);
        $this->appendData($data, 'region',            $part['region']);
        $this->appendData($data, 'upload_id',         $part['upload_id']);

        $this->appendData($data, 'part',              $part['part_num']);
        $this->appendData($data, 'store_location',    $part['location']);
        $this->appendData($data, 'md5',               $chunk_data['md5']);
        $this->appendData($data, 'size',              $chunk_data['size']);

        if ($this->intelligent) {
            $this->appendData($data, 'multipart', true);
            $this->appendData($data, 'offset', $chunk_data['offset']);
        }

        $this->appendSecurity($data);

        array_push($data, [
            'name'      => 'files',
            'contents'  => '',
            'filename'  => $part['filename']]);

        return $data;
    }
protected function buildChunkData ( $ part , $ chunk_data ) { $ data = [ ] ; $ this -> appendData ( $ data , 'apikey' , $ part [ 'api_key' ] ) ; $ this -> appendData ( $ data , 'uri' , $ part [ 'uri' ] ) ; $ this -> appendData ( $ data , 'region' , $ part [ 'region' ] ) ; $ this -> appendData ( $ data , 'upload_id' , $ part [ 'upload_id' ] ) ; $ this -> appendData ( $ data , 'part' , $ part [ 'part_num' ] ) ; $ this -> appendData ( $ data , 'store_location' , $ part [ 'location' ] ) ; $ this -> appendData ( $ data , 'md5' , $ chunk_data [ 'md5' ] ) ; $ this -> appendData ( $ data , 'size' , $ chunk_data [ 'size' ] ) ; if ( $ this -> intelligent ) { $ this -> appendData ( $ data , 'multipart' , true ) ; $ this -> appendData ( $ data , 'offset' , $ chunk_data [ 'offset' ] ) ; } $ this -> appendSecurity ( $ data ) ; array_push ( $ data , [ 'name' => 'files' , 'contents' => '' , 'filename' => $ part [ 'filename' ] ] ) ; return $ data ; }
Create data multipart data for multipart upload api request
Create data multipart data for multipart upload api request