存储图像的位置:文件系统数据库? [英] Where to store images : Database of File Sytem?

查看:102
本文介绍了存储图像的位置:文件系统数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个桌面应用程序,可以在5或10分钟的间隔后自动连续捕获图像。我必须存储这些图像,以便可以通过Web应用程序在线访问这些图像。



请告诉我存储这些图像的最佳方式是什么:数据库或FTP等文件系统。



我已经尝试过使用ftp但是在上传第二张图片后它会抛出错误。我已经尝试了很多,但没有什么可以做的。



所以请建议我一个最好的解决方案。此外,每天或每周存储的图像将非常大。

解决方案

我建​​议将图像存储在文件系统中;然后图像文件的名称(给它们相对于某个路径的唯一名称)可以很好地存储在你的数据库中。



如果你需要定期存储图像基础上,您还可以将文件时间或上传时间存储为与文件名相同的数据库记录的属性;它可以很容易地创建数据库查询以按时间帧获取文件。



使用FTP(或者说,HTTP)传输图像文件非常简单。但是,如果没有看到合适的代码示例,我们就无法修复代码我认为你甚至不需要它。您可以找到大量的代码示例,因此您可以使用一个这样的示例开始。



-SA

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.

解决方案

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


这篇关于存储图像的位置:文件系统数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆