Skip to content

Commit 9d003e7

Browse files
committed
fix download and useFile with new path format
1 parent d350498 commit 9d003e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/views/index.blade.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ function download(file_name) {
410410
location.href = '/laravel-filemanager/download?'
411411
+ 'working_dir='
412412
+ $('#working_dir').val()
413+
+ '&type='
414+
+ $('#type').val()
413415
+ '&file='
414416
+ file_name;
415417
}
@@ -427,6 +429,10 @@ function useFile(file) {
427429
item_url = file_url;
428430
@endif
429431
432+
if (path.indexOf(ds) === 0) {
433+
path = path.substring(1);
434+
}
435+
430436
if (path != ds) {
431437
item_url = item_url + path + ds;
432438
}

0 commit comments

Comments
 (0)