Skip to content

Commit caa3ab0

Browse files
committed
fix uploaded files not seen issue
1 parent 35d9bdd commit caa3ab0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/views/index.blade.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
</div>
8787
</nav>
8888
<div class="visible-xs" id="current_dir" style="padding: 5px 15px;background-color: #f8f8f8;color: #5e5e5e;"></div>
89-
89+
9090
<div id="alerts"></div>
9191

9292
<div id="content"></div>
@@ -122,7 +122,7 @@
122122
<div class="modal-body">
123123
<form action="{{ route('unisharp.lfm.upload') }}" role='form' id='uploadForm' name='uploadForm' method='post' enctype='multipart/form-data' class="dropzone">
124124
<div class="form-group" id="attachment">
125-
125+
126126
<div class="controls text-center">
127127
<div class="input-group" style="width: 100%">
128128
<a class="btn btn-primary" id="upload-button">{{ trans('laravel-filemanager::lfm.message-choose') }}</a>
@@ -198,13 +198,12 @@
198198
dictDefaultMessage: 'Or drop files here to upload',
199199
init: function() {
200200
var _this = this; // For the closure
201-
this.on("addedfile", function(file) { refreshFoldersAndItems('OK'); });
202201
this.on('success', function(file, response) {
203-
204-
if(response != 'OK'){
202+
if (response == 'OK') {
203+
refreshFoldersAndItems('OK');
204+
} else {
205205
this.defaultOptions.error(file, response.join('\n'));
206206
}
207-
208207
});
209208
},
210209
acceptedFiles: "{{ lcfirst(str_singular(request('type'))) == 'image' ? implode(',', config('lfm.valid_image_mimetypes')) : implode(',', config('lfm.valid_file_mimetypes')) }}",

0 commit comments

Comments
 (0)