Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Plupload error with metronic 8.1.5


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>


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


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.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(