Category : dropzone

i want to automatically checking a file, if the name file already exist in database its will be remove from dropzone. here is the dropzone option: Dropzone.options.dropzone = { maxFilesize: 12, maxFiles:10, acceptedFiles: ".jpeg,.jpg,.png,.gif", timeout: 20000, parallelUploads:10, autoProcessQueue : false, addRemoveLinks:true, init:function(){ this.on("addedfile",function(file){ $.ajax({ url:"{{ route(‘photo.cek’) }}", type: ‘GET’, data:{ yohanes:file.name }, dataType: ‘json’, success: ..

Read more

Hi everyone I have this problem where I am not able to display the images that I have in the storage folder. I already connected the storage folder to the public one with the symlink (php artisan storage:link) but every time I try to visualize it I get this error from the console: "Failed to ..

Read more

I did a successful insert method using dropzone js, however when I try to edit these files bringing it from the server using dropzone v5.7.0’s own function called displayExistingFile, I can’t send it to the endpoint, and in the return generated in the dropzone.file property it is null Image example const galleryImages = new Dropzone(".dropzone", ..

Read more

Files can’t be upload to directory and give back error js and css from dropzone is included in head and footer properly Balde code:: @include(‘Templates.head’) <body style="background: #283747;"> @include(‘Menu.menu’) @if (Session::has(‘user’) && Session::has(‘privlages’) && Session::get(‘privlages’) >= ‘1’) <div class="container"> <div class="row"> <form action="/gallery_add_image" class="dropzone" style="margin-left: 10%; margin-right: 10%;"> @csrf <div class="fallback"> <input name="file" type="file" multiple ..

Read more

I’m using dropzone to allow a user upload a images. All is working fine however I want to remove the image from the server. This is working fine when the page initially loads. public function destroy(Request $request) { $filename = $request->get(‘filename’); Gallery::where (‘filename’, $filename)->delete(); Storage::disk(‘public’)->delete($filename); } When i try dd() public function destroy(Request $request) { ..

Read more

I work with laravel, vue js, vform and dropzone. I have a table, with 3 button every data row. button edit, delete and info. Below the code. <tr v-for="(item, index) in mainData"> <td>@{{ item.user.name }}</td> <td>@{{ item.title }}</td> <td v-html="item.detail"></td> <td><a href="#" @click="downloadFile(item)" class="btn btn-icon btn-primary"><i class="fas fa-download"></i></a></td> <td>@{{ setMoment(item.created_at,’DD-MM-YYYY’) }}</td> @if(Auth::user()->role == ‘admin’) <td ..

Read more

i´m traying to upload one video with dropzone and laravel, but when y select other type dropzone upload file ok and don´t return error and i need that only accept video type and if i select other type return a message. my actual code is: var var15671147011688676454ble = ”; @if(isset($restaurant) && $restaurant->hasMedia(‘video’)) var15671147011688676454ble = { ..

Read more

i have in an annonces table a multiple images, i want to update multiple images,I just want to send the data to controller but it return just image and token see image,I want to send id too,I believe that the renameFile: function(file) { return just images. details.blade.php <h3 class="jumbotron" id="id">{{ $annonces->id }}</h3> <h3 class="jumbotron">ajouter les ..

Read more

i have in an annonces table a multiple images, i want to update multiple images,I just want to send the data to controller but it gives me error : The PUT method is not supported for this route. Supported methods: POST.I don’t know where the error is. web.php Route::post(‘filesUpdate’,’[email protected]’)->name(‘filesUpdate’); AnnoncesController.php public function filesUpdate(Request $request) { ..

Read more

i have an annonces table which contains multipleimages field, i want to use a dropzone which can update annonces images, in console it displays > ["888.jpg"] > ["zzzz.jpg"] as two array, so I want to send two images to controller for update. details.blade.php <form method="post" action="{{url(‘annonces/filesUpdate’)}}" enctype="multipart/form-data" class="dropzone" id="dropzone"> <input type="hidden" name="_method" value="PUT"> {{ csrf_field() ..

Read more

I am trying to upload multi images on adding a new product the problem is how to clean up all those files that have not been used and stored in the server after submitted the form @csrf @lang(‘site.media’) </div> </div> <div class="form-group"> <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> @lang(‘site.add’)</button> </div> </form> This is javascript code ..

Read more

I am trying to upload multi images on adding a new product the problem is how to clean up all those files that have not been used and stored in the server after submitted the form @csrf @lang(‘site.media’) </div> </div> <div class="form-group"> <button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> @lang(‘site.add’)</button> </div> </form> This is javascript code ..

Read more

I’m getting file uploaded by dropzone always null even i’ve configure it as well in my Controller use IlluminateHttpRequest; use IlluminateHttpUploadedFile; public function fileUpload(Request $request) { var_dump($request->file(‘file’));die; // NULL } in my JS Dropzone.options.myDropzone = { paramName: ‘file’, maxFilesize: 5, // MB maxFiles: 20, acceptedFiles: ".jpeg,.jpg,.png,.gif", headers: { ‘x-csrf-token’: document.querySelectorAll(‘meta[name=csrf-token]’)[0].getAttributeNode(‘content’).value }, init: function() { this.on("success", ..

Read more

I would like to upload images by using dropzone. It is working fine on localhost. I am able to upload files. But when I uploaded my code server it is not initializing. I am triggering event on click of button. My code – //other fields <div class="dropzone" id="addProductDropzoneNew"></div> //other fields Js – Dropzone.options.addProductDropzoneNew= { url: ..

Read more

I am trying to do an Ajax Request. Here, the above problem is showing!! Trying to send request from removedfile Route.php Route::post(‘vendor/delete-product-image’,’[email protected]’); Js: Dropzone.options.dpzSingleFileP1 = { paramName: "fileDropzone1", // The name that will be used to transfer the file maxFiles: 1, addRemoveLinks: false, headers: { ‘X-CSRF-TOKEN’: $(‘meta[name="token"]’).attr(‘content’) }, previewTemplate: `<div class="dz-preview dz-complete dz-image-preview"> <div class="dz-image"> ..

Read more