I'm not sure if I understood your question right. But based on the details you provided there are many options you can go for.
The simplest one is as follows:
Just add :remote => true
to the rails form and submit the form and on the controller side you can create the object.
But if you want to be able to upload an image through a REST API then this link should help.
You can visit the SO question as well here which describes exactly what u want.