try
This commit is contained in:
parent
216198ea8a
commit
9b34046aca
1 changed files with 25 additions and 26 deletions
|
@ -26,7 +26,8 @@ inotifywait -m /out -e close_write |
|
|||
|
||||
# Datei in Chunks hochladen
|
||||
i=0
|
||||
while [ $i -lt $num_chunks ]; do
|
||||
while [ $i -lt $num_chunks ]
|
||||
do
|
||||
# Temporäre Datei für den Chunk
|
||||
temp_chunk_file="/tmp/chunk_$i"
|
||||
|
||||
|
@ -34,7 +35,8 @@ inotifywait -m /out -e close_write |
|
|||
dd if="$file_path" bs=$chunk_size skip=$i count=1 of="$temp_chunk_file" 2>/dev/null
|
||||
|
||||
# Überprüfen, ob der Chunk erfolgreich erstellt wurde
|
||||
if [ -f "$temp_chunk_file" ]; then
|
||||
if [ -f "$temp_chunk_file" ]
|
||||
then
|
||||
# Chunk hochladen
|
||||
curl --location "$UPLOAD_URL" \
|
||||
--header "Authorization: Bearer $AUTH_TOKEN" \
|
||||
|
@ -52,7 +54,4 @@ inotifywait -m /out -e close_write |
|
|||
# Inkrementieren des Chunk-Zählers
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
|
||||
|
||||
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue