JSFiddle - React, Tailwind, and code Playground
by ludohelder
HTML
<script src="//assets.transloadit.com/js/jquery.transloadit2-v2-latest.js"></script>
<form id="upload-form" action="/uploads" enctype="multipart/form-data" method="POST">
<input type="file" name="my_file" multiple="multiple" />
</form>
JavaScript
$(function() {
var $el = $('#upload-form');
$el.transloadit({
wait: true,
triggerUploadOnFileSelection: true,
params: {
auth: { key: "683ecbb0822a11e3b01585bea65be5a7" },
steps: {
import: {
robot: "/http/import",
url: "https://transloadit.com/img/robots/170x170/audio-encode.jpg"
},
resize: {
robot: "/image/resize",
use: ["import"],
width: 130,
height: 130
}
}
}
});
$el.transloadit('start');
});