https://github.com/brandonwingerair/spring-boot-photos-manager
Following a tutorial series by "Marco Codes" on YouTube.
https://github.com/brandonwingerair/spring-boot-photos-manager
Last synced: about 1 month ago
JSON representation
Following a tutorial series by "Marco Codes" on YouTube.
- Host: GitHub
- URL: https://github.com/brandonwingerair/spring-boot-photos-manager
- Owner: BrandonWingerAir
- Created: 2024-11-18T18:40:36.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T22:02:05.000Z (5 months ago)
- Last Synced: 2025-01-26T12:08:55.918Z (3 months ago)
- Language: Java
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Photos Path:
http://localhost:8080/photos### Photo Path:
http://localhost:8080/photos/1### Upload Path:
http://localhost:8080/upload.html### Download Path:
http://localhost:8080/photos/download/IMAGE_ID### H2 Database Console:
http://localhost:8080/h2-console### POST call (browser console):
```
(async function createPhoto() {
let photo = { "filename": "post.jpg"};
await fetch('http://localhost:8080/photos', {
method: "POST",
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(photo)
}).then(result => result.text())
.then(text => alert(text));
})();
```### DELETE call (browser console):
```
(async function deletePhoto(id) {
await fetch('http://localhost:8080/photos/' + id, {
method: "DELETE"
})
})("1");
```