mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
improve folder view - test with display-api
This commit is contained in:
@@ -12,10 +12,12 @@ patch {
|
||||
|
||||
body:json {
|
||||
{
|
||||
"command": "ls"
|
||||
"command": "find . -maxdepth 1 -mindepth 1 -print0 | while IFS= read -r -d '' f; do\n typ=$(file -b --mime-type -- \"$f\")\n size=$(stat -c '%s' -- \"$f\")\n created=$(stat -c '%w' -- \"$f\")\n [ \"$created\" = \"-\" ] && created=$(stat -c '%y' -- \"$f\")\n jq -n --arg name \"$f\" --arg type \"$typ\" --arg size \"$size\" --arg created \"$created\" '{name:$name, type:$type, size:($size|tonumber), created:$created}' | tr -d '\\n'\n echo\n done\n"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
@@ -5,11 +5,16 @@ meta {
|
||||
}
|
||||
|
||||
post {
|
||||
url: 127.0.0.1:1323/api/file/titel.jpg
|
||||
url: 127.0.0.1:1323/api/file/test.mp4
|
||||
body: file
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:file {
|
||||
file: @file(/home/fedorra-44/Downloads/10 Revenge Party und Playoff.mov) @contentType(video/quicktime)
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user