No you can't do this.
These codes not works because which you've done below (the section upload_image) is not right.
Try what I've done in this https://github.com/YanshuoH/NOMP-Web/pull/35/files