Hi Amitav Roy, Your teaching style is really awesome. I just need to ask that you created model Images but you haven't created its migration then how images table come to your Database ?
Great Tutorial. But I'm just curious will this post a security issue? I mean do we need to do an upload image exploit validation? There is a possibility the user may upload an image that can exploit your application. How are we going to implement this on laravel? Since you are using dropzone here? how do we handle such issues?
+Madzmar Ullang The only way to validate that would be to do a validation of the mime type after the file is uploading. I need to check if that can be done first at the client end.
Hi, I am trying to use dropzone on my laravel site but have some problem. 1- There is no file on my backend. I tryed "dd ($request->file('media'));" and it show null. When I remove the dropzone class in form tag it work. Any idea? 2- I have added a submit button and method="post" on form tag because it doen't submit auto Thank you
how to resize image ............i have the code but it have to make the two image first is original image and another is resize size ...........how can solved it ............
Hi, I got an issue following your tutorial as you have a mysterious navbar appearing after you add the auth validation on the gallery. Do you have the HTML code of it somewhere ? I'm able to create it myself, there's no doubt, but as I'm trying to follow your tutorial, this is missing somewhere :)
Hahaha.. good catch. As far as I remember the first screen that you see is where I didn't have the session logged in and then I worked on the code and when tried to save gallery, I got error.. understood I haven't logged in and so did that and then continued the tutorial. So, the magic of editing confused you :)
Not exactly. I ment you have designed a toolbar to disconnect which show the current logged in user. As well as the title of the page and the Home link... But neither of those are shown on your tutorial yet. I know I can reproduce it even if I don't use Foundation and prefer other CSS frameworks. Have you put this project with this bar on GitHub?
hi master ! could you please tell me if i store images in storage folder how to access that images ? i mad an app so the images are in storage folder and not gets display. thank you ! i hope to get some tips.
Well you should not store images in storage folder. That folder is for laravel to use. The cache data, log files etc are stored there. The only folder where you should store images and any other files which are publicly available is the public folder.
Nice tutorial, I am still waiting for next part.... i did add 2 file .css and .js to master.blade.php as you showing in this tutorial but dropzone is not working.. after refresh page I got just a white box (as you video) and it's not clickable even " Drop files here to upload'' text is missing.... any other file need to add????
Amitav Roy how many images can be uploaded in one time ? what is the limit and can we managed limit ...actually I want to upload 4 images in one time...
That's a dynamic nav which you can find inside nav Controller and for the active link, the logic is inside the route change which you can find in app.js
Nice Tutorial, but it seems like it's not saving in my database. I only get internal server error in my network! Hope you can help. You just earned a subscriber mate.
+Amitav Roy I just fixed it . I felt stupid. I had the $filename variable as $galleryname. but anyway thank you for taking your time to respond. I've been following your channel.
My method doImageUpload is here : public function doImageUpload(Request $request) { // Get the file from the post request $file = $request->file('file'); // Set my file name $filename = uniqid() . $file->getClientOriginalName(); // move the file to correct location $file->move('gallery/images', $filename); // Save the details into the database $gallery = Gallery::find($request->input('gallery_id')); $image = $gallery->image()->create([ 'gallery_id' => $request->input('gallery_id'), 'file_name' => $filename, 'file_size' => $file->getClientSize(), 'file_mime' => $file->getClientMimeType(), 'file_path' => 'gallery/images/' . $filename, 'created_by' => Auth::user()->id, ]); } } file gallery.php is here :
I think your relations are creating a problem. Why don't you try doing one thing... first directly save the image $image->create instead of $gallery->image->create()
Hi Amitav Roy,
Your teaching style is really awesome. I just need to ask that you created model Images but you haven't created its migration then how images table come to your Database ?
you can do it manually in php my admin
Hope this is solved.
Thanks for the comment and I am glad you like the content
Great Tutorial. But I'm just curious will this post a security issue? I mean do we need to do an upload image exploit validation? There is a possibility the user may upload an image that can exploit your application. How are we going to implement this on laravel? Since you are using dropzone here? how do we handle such issues?
+Madzmar Ullang The only way to validate that would be to do a validation of the mime type after the file is uploading. I need to check if that can be done first at the client end.
Nice tutorial. Can wait for the next part.
Horia Dobre Great... will be uploading the next part on Wednesday... stay tuned.
Cheers
I am having problems with the image upload, my console error is "post localhost:8000/image/do-upload 404 (not found)
Any reasons as to why?
+Aaron Sherry need to see the code. 404 means ideally you have made some mistake with the url hence a not found error.
Hi,
I am trying to use dropzone on my laravel site but have some problem.
1- There is no file on my backend. I tryed "dd ($request->file('media'));" and it show null. When I remove the dropzone class in form tag it work. Any idea?
2- I have added a submit button and method="post" on form tag because it doen't submit auto
Thank you
use
dd ($request->file('file'));
too old, archiving.
Is there any process to remove image ?? because it is automatically loading after selecting.
yes
i am getting 500 internal error. Please Help me
too old, archiving
how to resize image ............i have the code but it have to make the two image first is original image and another is resize size ...........how can solved it ............
check the video where i am using intervention... that is how you can create the images
Hi, I got an issue following your tutorial as you have a mysterious navbar appearing after you add the auth validation on the gallery. Do you have the HTML code of it somewhere ? I'm able to create it myself, there's no doubt, but as I'm trying to follow your tutorial, this is missing somewhere :)
Hahaha.. good catch. As far as I remember the first screen that you see is where I didn't have the session logged in and then I worked on the code and when tried to save gallery, I got error.. understood I haven't logged in and so did that and then continued the tutorial. So, the magic of editing confused you :)
Not exactly. I ment you have designed a toolbar to disconnect which show the current logged in user. As well as the title of the page and the Home link... But neither of those are shown on your tutorial yet. I know I can reproduce it even if I don't use Foundation and prefer other CSS frameworks. Have you put this project with this bar on GitHub?
hi master !
could you please tell me if i store images in storage folder how to access that images ?
i mad an app so the images are in storage folder and not gets display.
thank you !
i hope to get some tips.
Well you should not store images in storage folder. That folder is for laravel to use. The cache data, log files etc are stored there. The only folder where you should store images and any other files which are publicly available is the public folder.
php artisan storage:link
Nice tutorial, I am still waiting for next part.... i did add 2 file .css and .js to master.blade.php as you showing in this tutorial but dropzone is not working.. after refresh page I got just a white box (as you video) and it's not clickable even " Drop files here to upload'' text is missing.... any other file need to add????
Ashish Rastogi No, the two files are what you need to get that thing.
Amitav Roy got it okay!
Amitav Roy how many images can be uploaded in one time ? what is the limit and can we managed limit ...actually I want to upload 4 images in one time...
Where is the code to make this nav bar? Thanks!
That's a dynamic nav which you can find inside nav Controller and for the active link, the logic is inside the route change which you can find in app.js
Nice Tutorial, but it seems like it's not saving in my database. I only get internal server error in my network! Hope you can help. You just earned a subscriber mate.
+Santiago Nicolas Granada send me some details and I will help you out. no issues with that
+Amitav Roy I just fixed it . I felt stupid. I had the $filename variable as $galleryname. but anyway thank you for taking your time to respond. I've been following your channel.
+Santiago Nicolas Granada NO issues my friend.. a lot of time we do get stuck with such stupid issues... :) Good to know you fixed that.
any full source code hosted somewhere?
Too old... so archiving
does this work for any type of file? :)
Yes, it's an uploading library. You can allow the user to upload any kind of files like PDF, Word documents or any other.
Hello, sir i have a problem to upload with dropzone...
The mistake is method image() is not an instance
Can you share the code?
My method doImageUpload is here :
public function doImageUpload(Request $request)
{
// Get the file from the post request
$file = $request->file('file');
// Set my file name
$filename = uniqid() . $file->getClientOriginalName();
// move the file to correct location
$file->move('gallery/images', $filename);
// Save the details into the database
$gallery = Gallery::find($request->input('gallery_id'));
$image = $gallery->image()->create([
'gallery_id' => $request->input('gallery_id'),
'file_name' => $filename,
'file_size' => $file->getClientSize(),
'file_mime' => $file->getClientMimeType(),
'file_path' => 'gallery/images/' . $filename,
'created_by' => Auth::user()->id,
]);
}
}
file gallery.php is here :
I think your relations are creating a problem. Why don't you try doing one thing... first directly save the image $image->create instead of $gallery->image->create()
Si i have repeated exactly your tutorial but i have the dame err
or two months ago
Please Make Tutorial For DropZone Multiple File Upload with a Submit Button.
Too old... archiving