Upload multiple canvas images through javascript loop

前端 未结 4 1344
感情败类
感情败类 2021-01-28 17:36

I am trying to make an upload script which resizes multiple images client side before the saveimage.php handles them. The reason for this is because they will be upload

4条回答
  •  滥情空心
    2021-01-28 18:06

    I have struggled with the same problem for some time now, but I finally cobbled together another solution, using bits of code from others, who have addressed this problem, and it works. It may not be perfect, and I would welcome any improvement suggestions. The concept is that you have two Javascript Functions, which are identicle called Resize0 and Resize1, and they call each other until all photos have been resized then the Function which resizes the last image Submits the Form. The two Functions pass parameters between each other so that one of them will know when to Submit the Form. Two of those parameters are, Number_Of_Images and current Image_Number. You can also download a working Example Web page from http://www.wantitconsulting.co.nz/ExampleResizeUpload.zip . You will need to create a folder in the base directory of your test web site for the Images to go into. The foldername is TestResizeUpload. The Server side uses php.

提交回复
热议问题