I use plupload to big size file upload. When I add plupload styles & scripts, its not working. No error showing console. Unable to upload anything. I user metronic demo 1, default assets, don't change the build. here is my js screenshot:
https://paste.pics/9fdb0d36d6b2f9c47f507f82bf8b322c
and here is script
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="{{ asset("plugins/plupload/plupload.full.min.js") }}"></script>
<script type="text/javascript" src="{{ asset("plugins/plupload/jquery.ui.plupload/jquery.ui.plupload.min.js") }}" charset="UTF-8"></script>
<script type="text/javascript">
$(function() {
// Initialize the widget when the DOM is ready
$("#uploader").plupload({
// General settings
runtimes: "html5",
url: "/user/order/image/pulpload?order_id=" + $("#order_id").val(),
max_file_count: 2500,
// Maximum file size
max_file_size: "25gb",
chunk_size: "1mb",
max_retries: 500,
headers: {
"X-CSRF-TOKEN": $("meta[name="csrf-token"]").attr("content")
},
// Specify what files to browse for
filters: [
{title: "Image files", extensions: "jpg,gif,png,jpeg"},
{title: "Zip files", extensions: "zip,rar"},
{
title: "Photoshop files",
extensions: "psd,ai,eps,tif,tiff,pdf,crw,cr2,dng,nef,raw,rw2,arw,heic,heif,PSD,AI,EPS,TIF,TIFF,PDF,CRW,CR2,DNG,NEF,RAW,RW2,ARW,HEIC,HEIF"
}
],
multipart: true,
multipart_params: {
order_id: $("#order_id").val(), // use filename as a key
},
prevent_duplicates: true,
// 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: "/js/Moxie.swf",
// Silverlight settings
silverlight_xap_url: "/js/Moxie.xap",
init: {
UploadComplete: function (up, files) {
// Called when all files are either uploaded or failed
// alert(data);
$.get("/user/sent_email", function (data) {
if (data == "success") {
// alert("success");
window.location.href = "/user/order/success";
}
});
}
}
});
});
</script>
Facing a Plupload issue with Metronic 8.1.5? ChatGPT suggests checking if Metronic's built-in file upload features might conflict with Plupload. Try disabling them temporarily. If you're still stuck, share relevant code snippets (Plupload setup, Metronic integration) for more targeted help.
Hi,
You should execute the plupload initialization in the jquery ready event in order to execute it when all js is fully loaded. For more info please check jQuery Ready docs.
Regards.