1

I want to upload a large file (video) up to size 40mb to sever.

When I upload a file size 2mb, it works very fine, but when the file size exceeds 4mb it times out.

This is how I'm uploading:

    $getTrailer = Input::file('Filedata');
    $trailer = time().'.'.$getTrailer->getClientOriginalExtension();
    $destinationPath = public_path().sprintf('/assets/admin/images/movie/trailers/videos/');
    Input::file('Filedata')->move($destinationPath, $trailer);
Kuya
  • 7,280
  • 4
  • 19
  • 31
omer zubair
  • 11
  • 1
  • 2
  • 3
    Possible duplicate of [PHP change the maximum upload file size](http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size) – aldrin27 Nov 07 '15 at 07:11
  • 1
    I have shared server. can't access the php.ini file. what should i do? – omer zubair Nov 07 '15 at 07:23

2 Answers2

0

I would suggest using a third party code library called BlueImp (link) which uses asynchronous javascript. It solves many problems with handling large file uploads via a web interface and offers a host of features that simplify it for the developer and the user such as:

  • file chunking so upload limits can be circumvented
  • drag and drop support
  • multiple file support
  • graceful fallback for browsers that need it

It might take a bit of effort to learn how to use it, but you might find it to be a very useful development tool that is relatively easy to customize.

Octopus
  • 8,075
  • 5
  • 46
  • 66
-1

Use laravel disk storage .

Storage::disk('local')->put('file.txt', 'Contents');

Check this answer

Community
  • 1
  • 1
Meera
  • 107
  • 1
  • 1
  • 12