I have the following scenario:
- user selects an image to upload (simple form with input field where type="file")
- File is upload to server (also Db is updated)
all this i already have..
I need to display the uploaded image on the page, upon success , without refresh.
Can this be done without iframes?
I have already done some ajax coding where input is saved to db or is used to return content from db.
The thing here is sending the actual file data from the field. Can I do this using jquery's $.get
?
I was thinking that after copying the file and storing relevant data in the db i could return the new location (the path in the server where the file was copied). The jquery code catching this return could use it to set the src
atribute of an img tag to the new file' thus displaying it.
Can you please recommend relevant tutorials or demos?
also, any tips would be very appreciated