Here goes:
I have 2 MVC3 projects in the solution, where one is for the Admin and the other is for common Users.
The Admin dynamically upload images in a folder in his project.
So I want to get that images from the User project to show in same web pages.
I also have three projects that represent the Services, App Logic and the Data Access.
I have been looking for a solution and found same things:
1- Store the image in the database and then retrieve it to User project from a service.
2- Reference the image from the User MVC project. (Couldnt do it)
What is the best aproach?
How can i implement the first one?
Thanks!
Firstly, is there a reason you have two applications and not a single application with an admin area that is authorised users only?
As for storing the image in the database you can convert the image to a byte array and store it as varbinary(max) in your database.
This question shows an example of converting the file stream (I assume you are uploading the image through a form) to a byte array: Convert a bitmap into a byte array