I have a model with many attributes, and image is one of them. How can I send a picture to the server alongside with the other attributes using the save method ?
Asked
Active
Viewed 57 times
0
-
Did you tried to save it? – vvahans Dec 05 '14 at 11:11
1 Answers
0
You probably want to use the FileReader API as described in answers here or here. However, it's been noted that FileReader isn't supported in older browsers, such as IE<10, so if it's important to you to support these browsers you might want to send the image to the server after the user selects it, and have the server respond with a binary representation of the image or a unique id that refers to the image now stored on the server.

Community
- 1
- 1

Hart Simha
- 862
- 8
- 14