gpt4 book ai didi

fine-uploader - 给每个附件一个标题

转载 作者:行者123 更新时间:2023-12-04 06:34:42 26 4
gpt4 key购买 nike

我希望使用 Fineuploader 为每个上传的项目添加标题/名称。每个附件都会在其旁边显示一个文本框,以便用户可以在按“上传”之前输入标题/名称 like this

我看过了,每个上传请求都会发送类似

的内容
fine.uploader.php?qquuid=f5ff0211-c004-4b1d-8ea7-228d49c4a694&qqtotalfilesize=54&qqfile=DrayTek.txt

如果我可以让它添加“&title”——我有 PHP 来处理 fine.uploader.php 上的任何“GET”

$(document).ready(function() {
var manualuploader = new qq.FineUploader({
element: $('#manual-fine-uploader')[0],
request: {
endpoint: 'fine.uploader.php?parent_type=<?php echo $parent_type; ?>&parent_id=<?php echo $parent_id; ?>&initial=<?php echo $initial; ?>&view=<?php echo $view; ?>&crm_user=<?php echo $crm_user; ?>'
},
autoUpload: false,
text: {
uploadButton: '<i class="icon-plus icon-white"></i> Add Attachments'
}
});

$('#triggerUpload').click(function() {
manualuploader.uploadStoredFiles();
});

});

最佳答案

查看setParams 方法。这会将设置的参数添加到您的请求中。

试试这个:

$(document).ready(function() {
var manualuploader = new qq.FineUploader({
element: $('#manual-fine-uploader')[0],
request: {
endpoint: 'fine.uploader.php'
},
autoUpload: false,
text: {
uploadButton: '<i class="icon-plus icon-white"></i> Add Attachments'
}
});

$('#triggerUpload').click(function() {

manualuploader.setParams({
parent_type: <?php echo $parent_type; ?>, // I am assuming that these are integer values that do not need quotes around them
parent_id: <?php echo $parent_id; ?>,
initial: <?php echo $initial; ?>,
view: <?php echo $view; ?>,
crm_user: <?php echo $crm_user; ?>
});

manualuploader.uploadStoredFiles();
});

关于fine-uploader - 给每个附件一个标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15570603/

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