gpt4 book ai didi

javascript - 如何使用 sweetalert2 上传多个文件

转载 作者:行者123 更新时间:2023-12-02 20:51:03 25 4
gpt4 key购买 nike

我想上传多个文件,此代码只选择一个文件上传

const { value: file } = await Swal.fire({
title: 'Select image',
input: 'file',
inputAttributes: {
'accept': 'image/*',
'aria-label': 'Upload your profile picture'
}
})

Codepen link

最佳答案

您需要将多个添加到您的输入

const { value: file } = await Swal.fire({
title: 'Select image',
input: 'file',
inputAttributes: {
'accept': 'image/*',
'multiple': 'multiple',
'aria-label': 'Upload your profile picture'
}
})

关于javascript - 如何使用 sweetalert2 上传多个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61602917/

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