The implementation process of adding and editing a picture management
1. Now in the addition|editing page of an article, the cover image of the article is realized by uploading the image by calling the interface image/upload. ID Write to the cover_image_id of the article table. as shown in Figure 1
2. Now it is planned to implement a picture management, and I also hope that the image/upload interface can be reused to realize image upload. However, when adding and editing pictures, when submitting the form, it should no longer be involved in the increase of records in the images table. Refer to WordPress’s media management, add a picture into two steps, the first step is to upload a picture, and the second step is to edit the picture information. as shown in Figure 2
3. The final implementation process is: when adding a form page, only upload pictures are allowed. After the upload is successful, it will automatically jump to the picture editing page. as shown in Figure 3


