Upload a folder by uploading a zipfile and decompressing it.

Review Request #2370 - Created Oct. 8, 2012 and submitted

Abraham Elmahrek
old-hue-rw
HUE-775
hue
enricoberti, romain
commit eaac25fc170730961a9844e68492e8fa8959442e
Author: abec <abe@cloudera.com>
Date:   Thu Sep 20 14:42:34 2012 -0700

    HUE-775 [fb] Upload zip file through filebrowser.
    
    - Added test cases to validate unzipping
    - Added upload scenarios to upload test case to ensure proper uploading and extraction
    - Added a hackish solution for explicitly requiring zip extraction
    - New 'uplaod archive' button.

:100644 100644 dbf0308... 248cb0a... M	apps/filebrowser/src/filebrowser/forms.py
:000000 100644 0000000... 70d096a... A	apps/filebrowser/src/filebrowser/lib/archives.py
:000000 100644 0000000... 95cab3d... A	apps/filebrowser/src/filebrowser/lib/archives_test.py
:100644 100644 2e536fd... 3f104f0... M	apps/filebrowser/src/filebrowser/templates/listdir.mako
:100644 100644 2807fd9... 5fb3040... M	apps/filebrowser/src/filebrowser/templates/listdir_components.mako
:000000 100644 0000000... 5391055... A	apps/filebrowser/src/filebrowser/test_data/test.zip
:100644 100644 58b6c19... 2c26a13... M	apps/filebrowser/src/filebrowser/urls.py
:100644 100644 c11cc63... 4536eed... M	apps/filebrowser/src/filebrowser/views.py
:100644 100644 a9c21e1... 413fde1... M	apps/filebrowser/src/filebrowser/views_test.py
:100644 100644 c941e4c... 351ea50... M	desktop/libs/hadoop/src/hadoop/fs/fs_test.py
:100644 100644 b7f33b7... 817fac5... M	desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
Ran all filebrowser and hadoop lib unit tests.
Visual confirmation.
  • 1
  • 0
  • 7
  • 4
  • 12
Description From Last Updated
Normally this class should become 5 lines when we are on 2.6 Romain Rigaux
  1. 
      
  2. Normally this class should become 5 lines when we are on 2.6
  3. Why not just get the tmpdir from tempfile?
    1. The temp dir is usually '/tmp'. We need a place to put all of our files so that we can move them to the correct location.
  4. We can have '.' in a zip file?
    
    If not we could merge _filenames() inside.
    1. It still seems best to create the directories first.
  5. still correct?
    1. Yes. The following code is creating a temp directory:
      directory = os.path.join(tempfile.gettempdir(), str(uuid.uuid4()))
      
  6. Can we use http://twitter.github.com/bootstrap/components.html#buttonDropdowns?
    
    e.g.
    [icon] Upload
    Files
    Zip Archives
  7. text/plain because of IE?
    1. It was a copy/paste from upload_file. I'm assuming this is an effect of IE.
  8. desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
    Remove it from oozie_setup?
    1. oozie_setup performs a (cp src/* dest/). copyFromLocal performs (cp src dest/). Their operations are slightly different. We could simplify copy_dir?
  9. 
      
  1. 
      
  2. desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
  3. 
      
Review request changed

Status: Closed (submitted)

Loading...