How does one delete files associated with multiple users?

Source: Internet
Author: User
User A uploads A file X to the server, and user B adds the file to the favorites folder. User A wants to delete the file, but user B adds it to the favorites. How can this problem be solved? If you do not delete an association, you can still access the original path. User A uploads A file X to the server, and user B adds the file to the favorites folder. User A wants to delete the file, but user B uses

What should I do if my account is added to my favorites? If you do not delete an association, you can still access the original path.

Reply content:

User A uploads A file X to the server, and user B adds the file to the favorites folder. User A wants to delete the file, but user B uses

What should I do if my account is added to my favorites? If you do not delete an association, you can still access the original path.

Usually, when designing a database, the attachment table must be a separate table and be associated with the user table. As per your needs, you only need to delete the association relationship of user A or another identifier of user A to record whether the attachment is deleted. It has nothing to do with user B and does not need to operate user B's data.

Involves three objects: User, file, and relationship]
If a user deletes a published file, the [ownership] relationship should be removed. Instead of deleting files.
To prevent files from being deleted and stored on the server without any favorites, you can set a regular monitoring function, directly clear automatically.

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.