laravelEcomm/public/Dashboard/js/file-upload.js

12 lines
398 B
JavaScript
Raw Normal View History

2024-07-12 07:06:02 +00:00
(function($) {
'use strict';
$(function() {
$('.file-upload-browse').on('click', function() {
var file = $(this).parent().parent().parent().find('.file-upload-default');
file.trigger('click');
});
$('.file-upload-default').on('change', function() {
$(this).parent().find('.form-control').val($(this).val().replace(/C:\\fakepath\\/i, ''));
});
});
})(jQuery);