allow to upload images

but also files, hmmmm
This commit is contained in:
2026-03-16 21:45:39 +03:00
parent 3a8bc6df2d
commit d8fc6e481f
18 changed files with 437 additions and 1 deletions

9
docs/api/.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
# Secrets
.env*
# Dependencies
node_modules
# OS files
.DS_Store
Thumbs.db

7
docs/api/auth/folder.yml Normal file
View File

@@ -0,0 +1,7 @@
info:
name: auth
type: folder
seq: 1
request:
auth: inherit

View File

@@ -0,0 +1,22 @@
info:
name: login user
type: http
seq: 2
http:
method: POST
url: "{{base_url}}/api/auth/login"
body:
type: json
data: |-
{
"email": "daniil@tsivinsky.com",
"password": "Daniil2000"
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,22 @@
info:
name: register user
type: http
seq: 1
http:
method: POST
url: "{{base_url}}/api/auth/register"
body:
type: json
data: |-
{
"email": "daniil@tsivinsky.com",
"password": "Daniil2000"
}
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,4 @@
name: dev
variables:
- name: base_url
value: http://localhost:5000

View File

@@ -0,0 +1,19 @@
info:
name: delete image
type: http
seq: 3
http:
method: DELETE
url: "{{base_url}}/api/images/:id"
params:
- name: id
value: 019cf7de-0844-76d0-9d84-a4bbe7afc475
type: path
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,7 @@
info:
name: images
type: folder
seq: 2
request:
auth: inherit

View File

@@ -0,0 +1,15 @@
info:
name: get user images
type: http
seq: 2
http:
method: GET
url: "{{base_url}}/api/images"
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,21 @@
info:
name: upload new image
type: http
seq: 1
http:
method: POST
url: "{{base_url}}/api/images"
body:
type: file
data:
- filePath: /home/daniil/Pictures/glizzy.png
contentType: image/png
selected: true
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5

View File

@@ -0,0 +1,10 @@
opencollection: 1.0.0
info:
name: image-storage
bundled: false
extensions:
bruno:
ignore:
- node_modules
- .git