1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | import os, sys |
---|
4 | sys.path.insert( 0, os.path.dirname( __file__ ) ) |
---|
5 | from common import submit |
---|
6 | |
---|
7 | try: |
---|
8 | data = {} |
---|
9 | data[ 'folder_id' ] = sys.argv[3] |
---|
10 | data[ 'file_type' ] = sys.argv[4] |
---|
11 | data[ 'server_dir' ] = sys.argv[5] |
---|
12 | data[ 'dbkey' ] = sys.argv[6] |
---|
13 | data[ 'upload_option' ] = 'upload_directory' |
---|
14 | data[ 'create_type' ] = 'file' |
---|
15 | except IndexError: |
---|
16 | print 'usage: %s key url folder_id file_type server_dir dbkey' % os.path.basename( sys.argv[0] ) |
---|
17 | sys.exit( 1 ) |
---|
18 | |
---|
19 | submit( sys.argv[1], sys.argv[2], data ) |
---|