1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#
# insert_cmd(dir, oldfile, newfile, cmd, url, name, tag)
#
# insert_cmd(dir, oldfile, newfile, cmd, url, name, tag)
#
## jsonp callback
#if param['callback'] is not None:
# url = (BASE_URL+dir+"/"+newfile).replace("'", "\\'")
# width, height = bin_identify (WORKING_DIR, newfile)
# print param['callback'] + "({"
# print "'url':'" + url + "',"
# print "'size':" + str(file_size (WORKING_DIR, newfile)) + ","
# print "'width':" + width + ","
# print "'height':" + height
# print "});"
# moveToS3(os.path.join(WORKING_DIR, newfile), "im/"+dir+"/"+newfile)
#else:
# print "#@im"
# print ", ".join([k+"="+str(v) for k,v in param.iteritems()])
# print " ".join(cmd)
# print BASE_URL+dir+"/"+newfile
# print file_size (WORKING_DIR, newfile)
# print bin_identify (WORKING_DIR, newfile)
# moveToS3(os.path.join(WORKING_DIR, newfile), "im/"+dir+"/"+newfile)
#
|