Closed Bankaphiwit closed 9 years ago
Can you post your code?
you can view demo and download code in link : http://schoobag.com/testupload/
if you upload .mp4 size > 45M code error
Do you know what the settings in your php.ini are for upload_max_size
and post_max_size
?
The default limit is something less than 10M, and an error will occur if an upload is attempted that exceeds the size limit.
Here's a Stack Overflow question about it:
http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size/2184541
Let me know what you find.
Btw, don't forget to restart your Apache server after making changes, if you end up changing anything.
yes, I change phpinfo
memory_limit: 128M
post_max_size : 500M
upload_max_filesize : 500M
but code same is error
you view phpinfo me to link : http://schoobag.com/schoobag/000.php
i can upload file .mp4 > 45M form normal code ext: "
"To be honest, I'm not sure what's causing the issue. I have two ideas:
multipart
option to true
in your Javascript settings.I'm trying setting { button: btn, url: 'upload_temp.php', progressUrl: 'uploadProgress.php', name: 'upload_progress_ba', multiple: true, maxUploads: 10, method: 'POST', allowedExtensions: ['mp4'], accept: 'video/*', responseType: 'json', data: {'data_numfile': 1}, }
Error when upload file > 45M, Error log in console : Line 1 :POST path/upload_temp.php?upload_progress_ba=test.mp4&data_numfile=1 SimpleAjaxUploader.js:1197
Line 2 :m.SimpleUpload._uploadXhr SimpleAjaxUploader.js:1197
Line 3 :m.SimpleUpload.submit SimpleAjaxUploader.js:1641
Line 4 :(anonymous function) SimpleAjaxUploader.js:846
SimpleAjaxUploader.js:1197 : 1194-1198 else { xhr.setRequestHeader( 'Content-Type', 'application/octet-stream' ); this.log( 'Commencing upload using binary stream' ); xhr.send( this._file ); }
SimpleAjaxUploader.js:1641: this._uploadXhr( filename, size, this._sizeBox, this._progBar, this._progBox, this._pctBox, this._abortBtn, this._removeAbort, this._queue[0].btn /* upload button */ );
SimpleAjaxUploader.js:846: 845-847 if ( self._opts.autoSubmit ) { self.submit(); }
when I click link error code Line 1 : text in page Fatal error: Uncaught exception 'Exception' with message 'Content length not supported.' in path\Uploader.php:36 Stack trace: #0 path\Uploader.php(92): FileUploadXHR->getFileSize() #1 path\upload_temp.php(43): FileUpload->__construct('upload_progress...') #2 {main} thrown in path\Uploader.php on line 36
code Error Uploader.php(36):32-38 public function getFileSize() { if (isset($_SERVER['CONTENT_LENGTH'])) { return (int)$_SERVER['CONTENT_LENGTH']; } else { throw new Exception('Content length not supported.'); } }
Uploader.php(92):89-97 if ($this->handler) { $this->handler->uploadName = $uploadName; $this->fileName = $this->handler->getFileName(); $this->fileSize = $this->handler->getFileSize(); $fileInfo = pathinfo($this->fileName); if (array_key_exists('extension', $fileInfo)) { $this->fileExtension = strtolower($fileInfo['extension']); } }
upload_temp.php(43): $Upload = new FileUpload('upload_progress_ba');
OK, I'm can upload complete because I'm trying setting multipart
option to true
.
Thunk you very very very must :) :+1:
Glad I could help.
Fatal error: Uncaught exception 'Exception' with message 'Content length not supported.' in C:\AppServ\www\path\uploadfile\Uploader.php:36 Stack trace: #0 C:\AppServ\www\path\uploadfile\Uploader.php(92): FileUploadXHR->getFileSize() #1 C:\AppServ\www\path\uploadfile\upload_temp.php(48): FileUpload->__construct('upload_progress...') #2 {main} thrown in C:\AppServ\www\path\uploadfile\Uploader.php on line 36
AND I edit code in File Uploader.plhp line 70 : public $sizeLimit = 1110485760; // Max file upload size in bytes (default 10MB)
But I can upload width normal form success ext :