razza_b
asked on
Photo file upload C#
Does anyone know how to do a file upload so that the file is added to a gallery for asp.net 4 C#?
so when a user uploads a file they see it in a gallery right away.
Thanks
so when a user uploads a file they see it in a gallery right away.
Thanks
ASKER
Is there any other way to store it other than db if it makes db very large?
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For the application like your application (Pic gallery) , Storing image in file system (In a physical folder) easiest and the best way.
There are some advantages and disadvantages in both. But for web application, file system is best.
Please see below URL.
http://www.findbestopensource.com/article-detail/store_image_db_or_file#
http://msdn.microsoft.com/en-us/library/aa260858(v=vs.60).aspx
There are some advantages and disadvantages in both. But for web application, file system is best.
Please see below URL.
http://www.findbestopensource.com/article-detail/store_image_db_or_file#
http://msdn.microsoft.com/en-us/library/aa260858(v=vs.60).aspx
You can store in physical folder with unique name for every image.
Like ../Images/image_1_1234.jpg
During upload, you just need to assign unique name to the image file and move into Image folder. Just store the reference
path for uploaded image in database table.
Like ../Images/image_1_1234.jpg
During upload, you just need to assign unique name to the image file and move into Image folder. Just store the reference
path for uploaded image in database table.
ASKER
Thanks for feedback guys.
tbsolutions - I like the carousel look, would this be the only code needed to do this from this page?...
Getting Started Section....
Dynamic content loading Section..
Accessing the jCarousel instance Section..
gdupadhyay: I think i'd prefer the file system but do you have any code examples of how to do file upload and having it displayed using this method?
And would the carousel pick load up the photos from the file system?
tbsolutions - I like the carousel look, would this be the only code needed to do this from this page?...
Getting Started Section....
Dynamic content loading Section..
Accessing the jCarousel instance Section..
gdupadhyay: I think i'd prefer the file system but do you have any code examples of how to do file upload and having it displayed using this method?
And would the carousel pick load up the photos from the file system?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Best way: Upload the image and stored in a folder with unique name.
Store the image path in database table and during page load, read all pic file path for login user
and display in your web page.
You can store the image in database, but it will make large DB. It took more space.
Let me know if you have any question.