use path
This commit is contained in:
parent
59547f3fb7
commit
63219bc01d
1 changed files with 3 additions and 3 deletions
|
@ -12,14 +12,14 @@ inotifywait -m /out -e close_write |
|
|||
chunk_size="$CHUNK_SIZE"
|
||||
id="${FILE%.mp4}"
|
||||
|
||||
file_size=$(busybox stat -c%s "$file_path")
|
||||
file_size=$(/bin/stat -c%s "$file_path")
|
||||
num_chunks=$(( (file_size + chunk_size - 1) / chunk_size ))
|
||||
|
||||
i=0
|
||||
while [ $i -lt $num_chunks ]; do
|
||||
offset=$(( i * chunk_size ))
|
||||
dd if="$file_path" bs=$chunk_size skip=$i count=1 2>/dev/null | \
|
||||
curl --location "$UPLOAD_URL" \
|
||||
/bin/dd if="$file_path" bs=$chunk_size skip=$i count=1 2>/dev/null | \
|
||||
/urs/bin/curl --location "$UPLOAD_URL" \
|
||||
--header "Authorization: Bearer $AUTH_TOKEN" \
|
||||
--form "recording_id=${id}" \
|
||||
--form "chunk_index=${i}" \
|
||||
|
|
Loading…
Add table
Reference in a new issue