Recently began to learn Java, a long time no articles, and long not to blog Park . Recently looked at the blog Park last written pictures uploaded a lot of people to see, today in some of the Java pictures uploaded. Background reception is using MVC. No ink, straight.
Look at the directory structure first. Idea Development.
First, the image upload or use of this JQ plugin. Front-end deployment of this plugin, needless to say.
Second, the front office code only need to cover a location. Because it is a more useful plugin. The plugin style modifies itself.
Third, backstage code.
Unseen at the back.
This image upload is mainly written by oneself several functions. Make picture storage more convenient. Divided into years and days of storage. But later traversal is more difficult, just for easy access. You can modify the code yourself if there is no need to distinguish it.
MD5 encryption is used in the inside. The file name takes MD5 top 20 to prevent the picture from repeating.
MD5 encryption Tool class.
Create a folder class by date.
This is the backend code. If there is anything do not understand, can add me qq1058179540 or QQ mail message.
。
Java image upload (MVC)