Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,
So what i want to achieve is i supposed to design one page in .aspx where the company can add their product. hence this information of product will get stored in sql database. now the logo of this company and product images are supposed to get uploaded/saved on domain provided that, these images should be get placed in the auto created directory on godaddy and this directory should have name same as the product name column from the sql table.how to do this? i this possible to implement? please tell me the steps and give some pointers to implement this...
n.b.the directory is supposed to be created by code behind in aspx page on the server path

thank you..
Posted
Comments
Nathan Minier 13-Oct-15 8:55am    
Is there a compelling reason that you wouldn't put these images in the database as well?
Member 11932995 13-Oct-15 9:03am    
yes actually there are so many images and so many companies so i just want to store these images systematically in the folder structure
Nathan Minier 13-Oct-15 10:02am    
Up to you. I'd still suggest having a look at the FILESTREAM object for SQL. It's also not too detrimental to put them in as BLOBS, providing you don't index the varbinary columns and your SELECTS are, well, selective.

1 solution

For a Web application, perhaps the best solution would be store images in the server-side host file system. You can give them all some unique names. Create some code generating unique names. This is easy, because the names have to be unique only in the scope of some sub-directory you use to store the image files. Then you would need to store just the file names relative to this directory. For example, for flat directory structure, it would be just simple file names without paths. It could be named just after some ordinary numbers.

And the file names defined this way can be stored in the database.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900