I created a form that allows a user to upload an image and then draw on it. I used the answers post here as a starting point. I am currently just waiting 5 seconds until the image is uploaded before modifying the image to fit the canvas. Is there any way to know that the image is completely uploaded?
Question
Question
Replies
replied on June 21, 2019
In my experience the field's change event is not triggered until the upload is complete for upload fields. So a simple on('change',function) works for me. I tested by making a copy of the image that was uploaded, the copy should fail if the change event fires before the upload is complete.
0
0
replied on June 24, 2019
I have found that in my testing the field's change event is not triggered until the upload is complete only when previewing a form. Once the form is used by starting the actual process it does wait for the upload to complete before triggering. My upload field is in a collection.
$('.cf-collection').on("change", ".upload", function(event) { var collectionRow = $(this).closest('.rpx'); var imgPreview = collectionRow.find('img.previewImage'); console.log(imgPreview); imgPreview[0].onload = function() { Test(collectionRow); } });
0
0
You are not allowed to follow up in this post.