🏗️Uppy File Upload Widget Integration with AWS S3
1. Uppy Library
<script src="https://releases.transloadit.com/uppy/v3.7.0/uppy.min.js"></script>
<link href="https://releases.transloadit.com/uppy/v3.7.0/uppy.min.css" rel="stylesheet">2. Path Extraction Function
<script>
BF.getPaths = function(data, filter) {
var paths = jp.paths(data, filter);
var arrayLength = paths.length;
var lineResult = [];
for (var i = 0; i < arrayLength; i++) {
var line = paths[i];
for (var j = 0; j < line.length; j++) {
var term = line[j];
if (term == "$") {
// Root element
} else if (typeof term === "number") {
lineResult[i] = lineResult[i] + "[" + term + "]";
} else {
lineResult[i] = lineResult[i] == null ? "data." + term : lineResult[i] + "." + term;
}
}
}
return lineResult;
}
</script>3. Named Action Promise Function
4. AWS S3 Setup
Action Scripts
Last updated
Was this helpful?