【发布时间】:2020-06-24 03:38:16
【问题描述】:
please see this image 1image 2 无法创建我的 Angular 8 项目的构建抛出找不到名称 FilestackTransform
onUploadSuccess(res: object) {
console.log('###uploadSuccess', res);
this.tempData = res;
this.tempUrl = this.tempData.filesUploaded[0].url;
const client = filestack.init(this.apikey); // initialize Filestack Client with your API key
const tr = new FilestackTransform(); // initialize Transformations UI
tr.setConfigKey('output.blob', true); // set Transformations UI to return blob
tr.open(this.tempUrl).then(res => {
client.upload(res).then((uploadRes) => { // upload result of the transformation
this.tempTranssformUrl = JSON.stringify(uploadRes.url, null, 2).split('"');
(<HTMLImageElement>document.querySelector("#result")).src = this.tempTranssformUrl[1];
this.isPicker = false;
})
});
}
【问题讨论】:
-
你是如何使用文件堆栈的?你安装了它的角度库吗?还是cdn还是什么?
-
我已经安装了filestack SDK并在header中添加了transform js库