1

我在上传到服务器之前裁剪图像,因此集成了裁剪模块。我想将裁剪后的图像上传到服务器但ngx uploader上传原始图像。

我用过ngx-uploader ngx-uploader: "6.0.1",并且用过cropper"ngx-image-cropper": 1.2.3.

对于上传者:https ://stackblitz.com/edit/ngx-uploader

对于作物:https ://www.npmjs.com/package/ngx-image-cropper

作物成功时调用以下函数。

startUpload(): void {
const event: UploadInput = {
type: 'uploadAll',
url: 'server path'
method: 'POST',
headers: 'custom header',
file: this.croppedImage,
};

this.uploadInput.emit(event);
}
4

0 回答 0