0
如何在同一頁面上顯示/顯示transloadit裝配結果?我需要改變這裏的形式作用如何在同一頁面顯示transloadit彙編結果?
"form action="/uploads"
我用下面的代碼,它顯示了第二個結果圖像,然後重定向到原始URL而不顯示結果圖像。
代碼:
$(function() {
$('form').transloadit({
wait: true,
triggerUploadOnFileSelection: true,
onResult: function(step, result){
if (step=='thumb'){
$("#thumbnail").html("<img src=' " + result.url + " '/>");
}
},
params: {
auth: { key: "Auth_Key" },
steps: {
thumb: {
use: ":original",
robot: "/image/resize",
result: true,
width: 250,
height: 250,
watermark_url: "https://transloadit.com/img/robots/170x170/video-encode.png",
watermark_size: "75%",
watermark_position: "center",
}