Image upload-Download-delete some experience of image management 2

Source: Internet
Author: User

Today again think of the film upload, I think there was a detail yesterday there is a problem.


Yesterday in the code of the time, did not consider deleting the temporary file problem.
Today, to increase the deletion of temporary files, found yesterday's code is a problem.


Last mentioned:


Class Photobean {
That are to be deleted, usually in the database.
Public list<photo> Todelete;
are going to be updated in the database, some of the latest content comes from the Web front end
Public list<photo> toupdate;
Will be added, because the uploading of images have been inserted, this time can be ignored
Public list<photo> Toadd;
}


The biggest change is in Toadd this collection.
When uploading a picture, if it is not immediately deposited into the database (the status is "temporary increase"), then the Toadd will be available when saving.
If the database has been deposited, toadd is null, that is, when the save is all updated and deleted, there is no increase.


The test process, found some problems.
Originally wanted to, more than a few days of testing in detail to write the complete idea.


Later, I thought about, why not by writing articles, the way of re-disk, by the way, the test of their own thinking is there a problem?


The 3rd article will be a more complete description of my "single Business Complete Solution".

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Image upload-Download-delete some experience of image management 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.