When creating a member information management screen,
If you haven't registered your profile picture, look like above
If you have registered your profile picture, I want you to show it like this.
The image storage logic is
After uploading, when you press the Save button, the image file is saved to the web server directory and the path is saved to db.
The above css used jasny bootstrap.
I'm developing the file for the first time, but there are a lot of things to pay attention to and it's hard ㅠ<
image file bootstrap
I don't know which template engine you use, but logic is simple.
When importing a photo path from DB, you can upload it if it is empty, and if so, you can lead it to change and delete it
if image // has an image
<img src="{{image}}"> // Process image display from template
<input type="file"> // change and delete markup
else // or
<img src="nothing.png"> // White Photo
<input type="file"> //upload
endif
You can handle it like this.
© 2024 OneMinuteCode. All rights reserved.