frozennode / multup Goto Github PK
View Code? Open in Web Editor NEWBundle for handling multiple image uploads in laravel 3 using the built-in laravel validation class
License: MIT License
Bundle for handling multiple image uploads in laravel 3 using the built-in laravel validation class
License: MIT License
When I use the file input as an array I get an error:
<input id="images" type="file" name="images[]" multiple="multiple">
Unhandled Exception
Message:
Call to a member function move() on a non-object
Location:C:\xampp\htdocs\laravel\laravel\input.php on line 231
But if I remove the [] and make it single I don't get an error but only the first image is ever saved.
$sizes = array(
array(210 , 210 , 'crop', 'public/img/items/thumbnails/210/', 90 ),
array(90 , 90 , 'crop', 'public/img/items/thumbnails/90/', 90 ),
);
$files = Multup::open('images', 'image|max:3000|mimes:jpg,gif,png', 'public/img/items/originals/')
->sizes( $sizes )
->set_length( 20 )
->upload();
Am I using it right?
Any help most appreciated,
Thanks!
Billy
Hello,
I don't know if it's my application issue or Multup so i just ask.
After downloading Multup and enabling it in bundles.php i get this error in my model when i try to use bundle:
Class 'Multup' not found
I have tried to
use Multup;
But nothing changes.
For example i use CRUD and Sentry bundles in my modules with no problem when i use proper namespaces.
What could be the problem?
I'm getting an error when I try to resize the images.
Missing argument 1 for Multup\Resize::resize(), called in C:\xampp\htdocs\laravel\bundles\multup\multup.php on line 190 and defined
I'm guessing it's because the class is called resize and that function is also called resize so it's treating it like a constructor?
Here's my code:
$sizes = array(
array(210 , 210 , 'crop', 'public/img/items/thumbnail/210/', 90 ),
array(90 , 300 , 'crop', 'public/img/items/thumbnail/90/', 90 ),
);
$files = Multup::open('images', 'image|max:3000|mimes:jpg,gif,png', 'public/img/items/originals/')
->sizes( $sizes )
->set_length( 20 )
->upload();
When I run your script and I do var_dump() on the
$upload = Multup::open('file', 'image|max:3000|mimes:jpg,gif,png', 'public/uploads/photogallery/', true)
->upload();
It only uploads one image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.