Changeset 1138 in main


Ignore:
Timestamp:
05/29/12 15:00:41 (7 years ago)
Author:
agalech
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/document3D/api.py

    r1134 r1138  
    188188    #    raise ValueError("Document "+ doc.reference+"/"+doc.revision+"/"+doc.name + " (present in the arborescence) does not contain files (" +str(extensions) +") to fulfil the check-out") 
    189189    return files ,  check_out_valide 
     190     
    190191@login_json     
    191192def add_zip_file(request, doc_id, unlock , thumbnail_extension ="False" ,thumbnail=False ): 
     
    212213            buf = bytearray(zip_file.read(filename)) 
    213214            tmp_file = io.BytesIO(buf) 
    214             dummy_file = File(tmp_file)   # this line actually fails 
     215            dummy_file = File(tmp_file)    
    215216            dummy_file.name = filename 
    216217            dummy_file.size = len(buf) 
    217218            dummy_file.file = tmp_file 
    218             df = doc.add_file(dummy_file, thumbnail=thumbnail) 
     219            df = doc.add_file(dummy_file,thumbnail=True) 
    219220             
    220221            if unlock == "False" or unlock == "false": 
     
    224225                buf = bytearray(zip_file.read(filename+"."+thumbnail_extension)) 
    225226                tmp_file = io.BytesIO(buf) 
    226                 dummy_file = File(tmp_file)   # this line actually fails 
     227                dummy_file = File(tmp_file)    
    227228                dummy_file.name = filename 
    228229                dummy_file.size = len(buf) 
Note: See TracChangeset for help on using the changeset viewer.