1 (edited by fakih 2016-10-04 10:33:44)

Topic: Is there any method to replace existing uploader's image?

Hai everyone, i would like to ask is there any method to replacing any image from the existing?
there are my flow. i want to combine js for editing image before file uploaded with CamanJS, CropperJS and Plupload to upload.

first, we choose the image with browse button and show the thumbnail.

i can get image object from plupload use

var reader = new window.FileReader();
        reader.readAsDataURL(uploaders['nav1'].getFile(id).getNative());
        reader.onload = function () {
        newImage.src = reader.result;
}

after i did some editing with camanjs and Cropperjs, i also can generated new object. now i'm using method removeFile(file) the existing and adding new one with addFile(file, [fileName])

is there any method in plupload that maybe can replace the existing image?  thank you

Re: Is there any method to replace existing uploader's image?

We do not have a dedicated method to replace the image, sorry. But what you do with removeFile()/addFile() basically does the same thing.

If you want to see your issue fixed, do not report it here, do it on - GitHub.