Images are generally stored on servers or databases?

Source: Internet
Author: User
Is the file name and path stored in the database or the image converted to binary data stored in the database? Which method is generally used? Is the file name and path stored in the database or the image converted to binary data stored in the database? Which method is generally used?

Reply content:

Is the file name and path stored in the database or the image converted to binary data stored in the database? Which method is generally used?

Store the file name and path in the database.
It is best to drop the image into CDN.

It is usually placed on the server and the data inventory path.

What are the application scenarios?

Reading files is faster than reading database records, but the limit is that you can only read local paths (of course, remote files can be shared using NFS or other methods ). In addition, when the file size is inconsistent (for example, the size is as small as two or three KB, and the size is as large as two or three GB), the file content cannot be stored in the database.

Save the path to the database.

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.