Giter VIP home page Giter VIP logo

laravel-imageupload's People

Contributors

lapubell avatar matriphe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravel-imageupload's Issues

Last folder always ignored

Hello , when using

Imageupload::upload($a, $b, $path)

The $path always ignores the last folder

Example : $path = "profiles/profile-test/" will save the image to profiles folder , if you add "/anything/" then it will save to /profiles/profile-test/.

cannot upload images for no reason

I used your awesome upload module to upload images.

composer.json require

"matriphe/imageupload": "5.*"

form

<input type="file" class="form-control" name="image" accept="image/gif, image/jpeg, image/png">

controller

if ($request->hasFile('image')) {
            Log::debug('Upload images: '.$post->id);
            Imageupload::upload($request->file('image'), $post->id);
        }

config

'newfilename' => 'custom',

However I couldn't upload the following image:

image

I don't know why.

I can upload jpeg, jpg, png, gif files without problems.

weird

How to delete images

I want to delete images when delete row product, this library is not supported?

is this package work with 5.3?

Hi this is a really simple and nice package... i am using this package with my projects. i wan to know is it working with 5.3?

custom filename gets double extension

When you choose for 'newfilename' => 'custom' in the config and you don't fill in a new filename on the Imageupload::upload() so it falls back on the default, the file gets an double extension because $this->results['original_filename'] already contains the $this->results['original_extension'].

In Imageupload.php on line 86 $this->results['original_extension'] should be removed at the end of the line.

Non-static method upload() should not be called statically

I am trying to upload using this package but getting this error.

**Non-static method Matriphe\Imageupload\Imageupload::upload() should not be called statically**

i check the core class Imageupload and i didn't find any static method while in the documentation every example used as static method.

Note: I am using laravel 5.6

Laravel 5.2

Laravel 5.2 is now the latest.
Could you please update the composer file?

Thank you!

Resized images are not saved

After updating to the latest library (we were on a version that was a few months old) we noticed that resized images are not being saved. Only the original was being saved even and nothing had changed in our code.

Traced this to no "save()" call in the resized image function.

Opened a PR to fix this #18

Let me know if there is a something wrong on my end and if resized images are being saved for others. Thanks!

How to maintain aspect ratio

Hi ,

This is realy a nice package which handles images very well. i want to maintain aspect ratio of images is this possible with this package?

getting error on file upload

Hi i am trying to upload file to public folder. there is no AWS or S3 storage still i am getting this error
Class 'League\Flysystem\AwsS3v3\AwsS3Adapter' not found

ย 

how this can be fixed?

Laravel 5.4, PHP 7.1

FileNotFoundException

Does anybody knows why is this happening?

FileNotFoundException in MimeTypeGuesser.php line 123:
The file "" does not exist

I'm trying to upload an image with this:

. . . //in PHP function //create new image if (!empty($data['image'])) { //var_dump($data); $imageUpload = Imageupload::upload($data['image'], null, 'uploads/images/'); $data['image'] = $imageUpload['filename']; } . . .

valid size and format of uploaded files

Hi
is it possible to get valid size and format of uploaded files from config/imageupload.php? how?
otherwise how can i add it to following piece of code?

if (Request::hasFile('file')) { $result = Imageupload::upload(Request::file('file')); }
for example if file is photo max upload size set to 2mb or if file is zip max upload size change to 30mb

Check if it is an image

Hey,

grat package, it is however coming with a big security hole. You need to implement a check that makes sure that it is indeed an image, if not reject it, don't even store it.

Best regards

Not working with laravel 5.4

Hi i am trying to integrate this in my project but it is throwing error.

FatalThrowableError in ImageuploadServiceProvider.php line 25: Call to undefined method Illuminate\Foundation\Application::share()

Composer Requirement for Laravel 5.1

Can you please update the library composer requirements for illuminate/support up to 5.1?

Not sure if it's tested, but supposedly 5.1 isn't a breaking release. It's LTS too, so it'd be worth it to make the library for that version. Thanks for the image uploading goodness!

$newfilename not working for rename!

hi
i want to rename exist files but my code not working!
Imageupload::upload($filesource, $newfilename, $dir) =>
$name is new name but it doesnt work: :(
$data['result'] = Imageupload::upload($request->file('file'),$name,'/3');
please help me. its my code:

if ($request->hasFile('file')) {

            echo $filename = $_SERVER['DOCUMENT_ROOT'].'/tebray/files/3/'.$request->file->getClientOriginalName();
           
            if (file_exists($filename)) {

                $orgname =  $request->file->getClientOriginalName();
                $temp = explode(".", $orgname);
                $name = $temp[0].'-c'. '.' . end($temp);
                echo "exist: ".$name;
            }else {
                $name =  $request->file->getClientOriginalName();
                echo "no exist: ".$name;
            }


            $data['result'] = Imageupload::upload($request->file('file'),$name,'/3');
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.