Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a desktop application that capture images continuously after an interval of 5 or 10 minutes automatically. I have to store these images so that these can be accessed online through web application.

So please tell me what is the best way for storage of these images : Database or File systems like FTP.

I have already tried with ftp but it throws error after uploading 2nd image. I have tried alot with it, but nothing going fine there.

So Please suggest me a best solution. Also the images stored per day or per week will be very large.
Posted
Updated 2-Sep-15 18:57pm
v2

1 solution

I would advise to store the images in the file system; and then the names of the image files (give them unique names relative to some path) can be well stored in your database.

If you need to store images on regular basis, you can also store the file time, or time of the upload as an attribute of the same database record as the file name; it would make it easy to create database queries for getting files by time frames.

Transmitting image files using FTP (or, say, HTTP) is quite trivial. But we cannot fix your code without seeing appropriate code samples. I don't think you even need it. You can find big number of code samples doing that, so you can use one such sample to start with.

—SA
 
Share this answer
 
v3
Comments
Sunil Thakur 3-Sep-15 1:22am    
Thanks for the reply.

Actually i tried to do the same as you have suggested. I upload the image to the ftp server and the image path to the database. But what happens next is that after uploading ist image, it throws error while uploading 2nd image, Request timed out. I have attached the code. Please help me regarding it.

Please help me where I am getting wrong.
Sergey Alexandrovich Kryukov 3-Sep-15 1:30am    
This is not "reply", this is the solution you expected, not counting fixing your FTP client code, which you could not possibly expect. Please, remove the code sample from comment to the question, where it can be properly formatted. Add precise exception information.
—SA
Sunil Thakur 3-Sep-15 2:27am    
Actually the problem with uploading in ftp is that, it uploads the first image but when uploading the image 2nd time it throws error 'The operation has timed out.'.My application is windows based (i.e Desktop application).
Sergey Alexandrovich Kryukov 3-Sep-15 2:33am    
This might be the problem of your server part. Anyway, this is not what you could call the comprehensive exception information.
—SA
Maciej Los 3-Sep-15 2:41am    
So, post it as another question and please accept Sergey's answer as a solution.

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