1. The pictures uploaded by cms are stored in Qiniu, converted to base64, and stored in the database.
what are the advantages and disadvantages of each of these two approaches?
1. The pictures uploaded by cms are stored in Qiniu, converted to base64, and stored in the database.
what are the advantages and disadvantages of each of these two approaches?
generally speaking, it is not converted to base64, and stored in the database. Because in fact, the base64 is also very large, which will lead to a very large table.
generally speaking, a database is the url address where pictures are stored. While files always need a place to store,
generally speaking, there are two solutions, self-built storage and cloud storage
1: it is directly stored in the local directory of the server in the form of a file (this is what many small websites do, such as personal blogs).
2: upload to a special image server (Qiniu can see a special picture server)
both of the above pictures are placed in the disk directory.
there are very few people actually put pictures into the database after base64 (don't do this, you can forget this practice, no one in the actual project should do this).
for a slightly larger project, the images must be placed in a special image server (you can use the storage services provided by the service provider, such as Qiniu, or you can build your own image server).
as for the advantages and disadvantages of the above two kinds, there are a lot of them on the Internet.
put Aliyun.
oss is uploaded to Aliyun, and then the server database stores the image address
if you want to save the database, you can also store binary directly. There is no need to transfer it to BASE64
.
company level, all rented OSS; if you are playing with yourself, there are many free and limited storage services, it seems that 7 Niu has
.generally, react and vue projects will be configured with routing. The home page is usually main , that is, visit http: www.xx.com -sharp main to visit the home page, but the actual project requires that the content of the home page be displayed wh...
problem description I try to package vue s official demo (hello word), with electron. Follow this tutorial https: blog.csdn.net j_bleac. my project directory structure: electron.jsconst { app, BrowserWindow } = require( electron ) *const e...
for separate projects, webpack dev server will put the js packaged by the development environment into memory and will not generate physical files on the hard disk. For projects that are not separated from each other, you need to use webpack watch for re...
react and vue have their own advantages react biosphere big vue is easy to learn I don t know how to persuade the leader to choose vue or react when you do the technical selection of the project. ...
problem description above webpack3, how to compress all packaged js files into one js file? the environmental background of the problems and what methods you have tried webpack.config.js const path = require( path ) const HTMLPlugin = require( ...
sources of topics and their own ideas What is the specific purpose of adding a unique key to ? does key have an optimized effect when rendering the list for the first time? when is key optimized? I hope to see this small problem and promote thi...
at present, according to the introduction of vue and jquery, on mobile and pc, the project wants to introduce these two third-party libraries into different pages through webpack, and at the same time, how to configure other public files into vendor? ...
at present, according to the introduction of vue and jquery, on mobile and pc, the project wants to introduce these two third-party libraries into different pages through webpack, and at the same time, how to configure other public files into vendor? ...
such as the above requirement, each reject button needs to have a corresponding small Modal component. At present, I have set up a Modal in each Item component. Item.js <li> <Modal v-if="isShow"> < li> but I don t t...
axios.get(path, { timeout: 1000, params: { id: 12 } }); repeatedly checked, backend 3 seconds to respond, I set axios 1 second timeout, but axios has not entered the catch, how fat 4? ...
interface Listeners { [propName: symbol]: Listener[]; }; the above code prompts [ts] Index signature parameter must be of type "string " or "number ". [1023] how to express that the key value of an object is of type symbol ...