Files are uploaded instantly and image editor settings are not applied

My head:
<script src=""></script>
<script src=""></script>

    uploadcare.registerTab('preview', uploadcareTabEffects)


data-tabs=“file camera url facebook gdrive gphotos”
data-effects=“crop, grayscale, sharp”

So the problem is that files are uploaded instantly to uploadcare when selected from a computer. So I dont even have to press add button. The problem is that because files are instantly uploaded, image editing (crop, greyscale…) are not affected because the image is already uploaded.

I have tried everything I know, could someone help me out. So I want upload to wait that all cropping etc are done and when pressed “ADD” only then files are uploaded or at least replaced with edited ones.

Hi @Mikko_Kankainen,

This is the expected behavior. The widget always uploads the original image, but it returns a URL with effects like this,52/-/preview/-/enhance/72/-/blur/25/

This URL will be set as a value of the widget’s hidden input element, and you can also get it programmatically using the JS API of the widget

const widget = uploadcare.Widget("[role=uploadcare-uploader]");

widget.onUploadComplete((fileInfo) => {
  console.log("Image uploaded: " + fileInfo.cdnUrl);

Check out this live example.

1 Like