Forum Discussion
_anomDiebolt_
7 years agoQrew Elite
It is pretty simple to use a short amount of script that will take a <input text=file> control and process (preview, scale, rotate, flip, crop, extract EFIX data ...) the selected image file prior to uploading the image to QuickBase. See this library for potential features:
JavaScript Load Image
https://github.com/blueimp/JavaScript-Load-Image
The key to doing this is to (1) use the FileReader API and (2) submitting the file using the Fetch API with FormData body.
The part that may be difficult to discover is that you have to set the subact to "save" when POSTing to ?a=FinishEditRecord:
JavaScript Load Image
https://github.com/blueimp/JavaScript-Load-Image
The key to doing this is to (1) use the FileReader API and (2) submitting the file using the Fetch API with FormData body.
The part that may be difficult to discover is that you have to set the subact to "save" when POSTing to ?a=FinishEditRecord:
var dbidTarget = "";
var fidTarget = "";
var myBlob = "";
var filename = "";
let myform = new FormData();
myform.set("subact", "save");
myform.set("rid", ridTarget);
myform.append('_fid_${fidTarget}', myBlob, filename);
let urlFileTarget = '${dbidTarget}?a=FinishEditRecord';
fetch(urlFileTarget, {
method: "POST",
body: myform,
credentials: "include"
}).then(response => {
// all done
});