As I see, there are 3 way to solve a problem^
- Use raw «base64 PNG» image data — for that use common input field type `text`. Than decode it on serverside and save as normal PNG file.
- Made JS code for follows: convert `PNG data:image` → canvas → common `img` tag with desired format (PNG/JPG/GIF) → «data:image with certain format». Save it to server as noted in p.1
- [not sure for that] Get binary data from base64 and try to send it via AJAX emulating common POST form file uploading (`multipart/form-data`)
Note: you can not use code to attach any data via input type `file` directly.