laravelEcomm/public/Dashboard/js/file-upload.js
2024-07-12 12:51:02 +05:45

12 lines
398 B
JavaScript

(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);