如何从JAVA / JSP检查图像是否存储在数据库中? [英] How to check whether the image is stored in database or not from JAVA/JSP?

查看:87
本文介绍了如何从JAVA / JSP检查图像是否存储在数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有保存图片的专栏。我在数据库中使用BLOB类型来存储图像。现在,我想检查用户是否从JSP页面提交了图片。我怎样才能做到这一点?

I have column to save image. I have use "BLOB" type in database to store image. Now, I want to check whether the user submitted picture or not from JSP page. How can I achieve this?

此问题的上一版本是
如何比较JSP中数据库(mysql)的BLOB是否为空?

推荐答案

因此无法检查。您可以将其设为非空列,以确保始终保存图像,或者您可以将控件提供给用户以编辑/删除保存的图像,这也将确保保存图像。

There is as such no way to check. You can either make it a not null column which will ensure the image is always saved or you can give the control to the user to edit/delete the saved image which will also ensure the image is saved.

这篇关于如何从JAVA / JSP检查图像是否存储在数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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