Data stock picture, is the name of the stock picture? Or save the picture path? ?

  question

Data stock picture, is the name of the stock picture? Or save the picture path? ?

As mentioned above, the reason why there is such a doubt is that the current picture is stored on the local server, but if the business scale expands in the future, the picture will definitely be migrated to the cloud storage service. At that time, the path of the picture will be changed. I am afraid that the picture on the original website will be displayed and all will be hung up.

I don’t know, when you save pictures to the database, you save the picture name (test.jpg) or save the picture path (usually/Data/UploadImage/2017-04-14/test.jpg)? ?

If the name of the picture is stored, the path will be changed and the code of the picture path will be directly modified.

If the path of the picture is stored, the path will be changed later, and the path of all the pictures in the database will need to be updated to solve the problem.

I don’t know how you saved your pictures after uploading them. ?

I get used to it
The path, name and suffix are stored separately, and then one field is the complete url, which connects all the above