2amigos / yii2-file-upload-widget

BlueImp File Upload Widget for Yii2
Other
252 stars 140 forks source link

Chunks Overwrite Themselves #164

Open jd82110 opened 5 years ago

jd82110 commented 5 years ago

I've set up the Yii2 widget to have a maxChunkSize of 10mb, as shown below:

            echo FileUploadUI::widget([
                'model' => new Model,
                'attribute' => 'doc',
                'url' => ['site/upload'],
                'gallery' => false,
                'fieldOptions' => [
                    'accept' => '*'
                ],
                'clientOptions' => [
                    'maxFileSize' => 100000000,
                    'maxChunkSize' => 10000000, // 10 MB
                ],

The chunks are successfully sent to the server but they are not stitched together. Rather, each chunk overwrites the previous leaving only one file that contains the last chunk. If I were to upload a 22mb file, the resulting file on the server would only be 2mb since it is the last chunk that is uploaded.

Am I missing a config option? What can I do to resolve this?