mirror of
https://github.com/mattintech/simplefileupload-server.git
synced 2026-07-11 16:31:53 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a9d816717f |
@@ -81,6 +81,9 @@ def add_chunk(upload_id, chunk_index):
|
|||||||
with get_db() as conn:
|
with get_db() as conn:
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
|
# Use IMMEDIATE transaction to prevent race conditions with parallel uploads
|
||||||
|
cursor.execute("BEGIN IMMEDIATE")
|
||||||
|
|
||||||
# Get current received_chunks
|
# Get current received_chunks
|
||||||
row = cursor.execute("""
|
row = cursor.execute("""
|
||||||
SELECT received_chunks FROM chunk_sessions WHERE upload_id = ?
|
SELECT received_chunks FROM chunk_sessions WHERE upload_id = ?
|
||||||
|
|||||||
Reference in New Issue
Block a user