1
사용자가 파일을 업로드 할 수 있도록 plupload를 사용하고 있습니다. plupload를 사용하여 두 개의 다중 매개 변수를 전달합니다. 첫 번째 매개 변수는 페이지가로드 될 때 동적으로 설정됩니다. 다른 하나는 사용자가 선택 메뉴에서 선택할 때 설정됩니다.plupload 동적 다중 매개 변수
두 번째 매개 변수는 페이지가로드 될 때 비어 있으며 사용자가 선택하면 plupload로 전달하는 방법을 알지 못합니다.
변경 기능에 plupload 코드를 추가하면 작동하지만 사용자가 선택할 때까지 plupload가 표시되지 않기 때문에 plupload 코드가 필요하지 않습니다.
누군가가 나를 도울 수 있기를 바랍니다. 나는 내 문제에 대한 해결책을 발견
$("#uType").change(function(){
var upType = $('#uType').val();
$("#type").val(this.value);
});
var uploader = $("#uploader").plupload({
// General settings
runtimes : 'html5,flash,silverlight,html4',
url : "/wp-content/plugins/tyhp-filemaker/tyhp-youth-upload.php",
// Maximum file size
max_file_size : '2mb',
chunk_size: '1mb',
// Resize images on clientside if we can
resize : {
width : 200,
height : 200,
quality : 90,
crop: true // crop to exact dimensions
},
multipart_params: {'type': $('#type').val(), 'account' : $('#AccountUpload').val()},
// Specify what files to browse for
filters : [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip,avi"}
],
// Rename files by clicking on their titles
rename: true,
// Sort files
sortable: true,
// Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
dragdrop: true,
// Views to activate
views: {
list: true,
thumbs: true, // Show thumbs
active: 'thumbs'
}
// Flash settings
flash_swf_url : '/plupload/js/Moxie.swf',
// Silverlight settings
silverlight_xap_url : '/plupload/js/Moxie.xap'
});