'; $("#images").fileinput({ -6ren">
gpt4 book ai didi

jquery - 删除项目 Bootstrap Fileinput 上的上传按钮

转载 作者:行者123 更新时间:2023-12-01 08:41:55 25 4
gpt4 key购买 nike

我无法从项目框中删除上传图标。我想在单击“发送”按钮时上传所有图像。谢谢

enter image description here

var btns = '<input type="hidden" id= "<?= $csrf['name'] ?>" name="<?= $csrf['name'] ?>" value="<?= $csrf['hash'] ?>">';
$("#images").fileinput({
uploadExtraData: {<?= $csrf['name'] ?>: "<?= $csrf['hash'] ?>", id_specie: "<?= $specie[0]['id_specie'] ?>"},
deleteExtraData: {<?= $csrf['name'] ?>: "<?= $csrf['hash'] ?>", id_specie: "<?= $specie[0]['id_specie'] ?>"},
initialPreview: <?= $immagini ?>,
initialPreviewConfig: <?= $galleria_immagini ?>,
initialPreviewAsData: true,
showCaption: true,
showUpload: false,
showRemove: false,
previewFileType: "image",
removeLabel: "Elimina",
uploadLabel: "Carica",
overwriteInitial: false,
maxFileSize: 10240,
uploadUrl: '<?= base_url() ?>specie/do_upload',
initialCaption: "Carica le immagini",
uploadAsync: true,
maxFileCount: 10,
allowedFileExtensions: ['png', 'jpg' ]
});



$("#send").click(function () {
// $("#images").fileinput({'uploadUrl': '<?= base_url() ?>specie/do_upload'});

$("#images").fileinput("upload");

});

最佳答案

language: 'en',
showCaption: true,
showPreview: true,
showRemove: true,
showUpload: false, // <------ just set this from true to false
showCancel: true,
showUploadedThumbs: true

如果这不起作用,请尝试:-

你可以用一种简单的方式做到这一点,也可以简单地写在一个属性data-show-upload="false"中,我也会工作!!

关于jquery - 删除项目 Bootstrap Fileinput 上的上传按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46090626/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com