RFTaurus's avatar

Why my Path after Upload Image always store in C:\xampp\tmp\blablabla.tmp even though its already uploaded in php my admin

Evening Everyone, currently i'm starting to learn about laravel (and find it very useful and already like it) and trying to use it for my project but i got stuck when i'm trying to upload my image to finish one some task. after searching all around place for solution i found that it still didn't work.

I'm using Laravel 5.5 on windows 10.

I tried to upload image and it's already success and already stored in database but the path that appear always in this directory --> C:\xampp\tmp\

even i'm already put it and make a function it won't change into public. i already trying a lot of method like storage:link but when i do systemlink it always said that its not defined but the storage:link already successfully created.

i'm already tried to change filesystem.php in config too but it still return that path. even i'm trying to find the file in that tmp directory, i can't find anything.

i want to upload multiple photo and it success and i can download the binary file for the image but still i can't edit it, delete, and show it, since i can't find the right path for that.

can someone please help me to solve this problem since i already stuck for around 5 days?

0 likes
3 replies
Raimondas's avatar
Level 2
        if(Input::hasfile('image'))
        {
            $request->file('image')->move(public_path('img/products/'), $request->file('image')->getClientOriginalName());

            $product->image = 'img/products/' . $request->file('image')->getClientOriginalName();
        }
                    <div class="control-group">
                        <label label-default="" class="control-label">Photo</label>
                        <div class="controls">
                            <input id="image" name="image" type="file"/>
                        </div>
                    </div>

I'm using this it works. Try it maybe it will help you.

2 likes
RFTaurus's avatar

@Raimondas Hey, it great help, finally it works, thankyou so much, it really make my day man

Please or to participate in this conversation.