v2.0 changes
This commit is contained in:
@@ -208,14 +208,14 @@ upload_file_in_chunks() {
|
||||
if [ "$DEBUG_MODE" = "true" ]; then
|
||||
echo ""
|
||||
echo "DEBUG: SESSION_ID='$SESSION_ID'"
|
||||
echo "DEBUG: Uploading to: $API_BASE/upload/chunk?uploadSessionId=$SESSION_ID&fileType=$file_type&chunkIndex=$chunk_index&totalChunks=$total_chunks&fileName=$file_name"
|
||||
echo "DEBUG: Uploading chunk to: $API_BASE/upload/chunk?uploadSessionId=$SESSION_ID&fileType=$file_type&chunkIndex=$chunk_index&totalChunks=$total_chunks&fileName=$file_name"
|
||||
fi
|
||||
|
||||
# Send metadata as query params (for Java proxy to capture) and only file as multipart
|
||||
# Add explicit headers that nginx might require
|
||||
# Send metadata as query params and chunk file as raw binary body
|
||||
# This works with Java proxy that forwards body as-is
|
||||
RESPONSE=$(curl -s -X POST "$API_BASE/upload/chunk?uploadSessionId=$SESSION_ID&fileType=$file_type&chunkIndex=$chunk_index&totalChunks=$total_chunks&fileName=$file_name" \
|
||||
-H "X-Forwarded-For: 127.0.0.1" \
|
||||
-F "chunk=@$chunk_file")
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary "@$chunk_file")
|
||||
|
||||
if [ "$DEBUG_MODE" = "true" ]; then
|
||||
echo "DEBUG: Chunk response: $RESPONSE"
|
||||
|
||||
Reference in New Issue
Block a user