Ticket #834: ticket834.patch

File ticket834.patch, 678 bytes (added by saul, 11 years ago)

Patch to fix file size limitations (#834)

  • mediagoblin/submit/lib.py

    :100644 100644 c70e273... 0000000... M	mediagoblin/submit/lib.py
    
    diff --git a/mediagoblin/submit/lib.py b/mediagoblin/submit/lib.py
    index c70e273..2392ddc 100644
    a b def submit_media(mg_app, user, submitted_file, filename,  
    151151    queue_file = prepare_queue_task(mg_app, entry, filename)
    152152
    153153    with queue_file:
    154         queue_file.write(submitted_file.read())
     154       while True:
     155           data = submitted_file.read(16384)
     156           if not data:
     157               break
     158           queue_file.write(data)
    155159
    156160    # Get file size and round to 2 decimal places
    157161    file_size = mg_app.queue_store.get_file_size(