aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'jm2l/upload.py')
-rw-r--r--jm2l/upload.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/jm2l/upload.py b/jm2l/upload.py
index e063dc4..f0fe718 100644
--- a/jm2l/upload.py
+++ b/jm2l/upload.py
@@ -97,7 +97,7 @@ class MediaPath():
p = IMAGEPATH + [ media_table ] + [ linked_id ]
elif media_table=='tasks':
# Use Current Year
- p = IMAGEPATH + [ 2015, media_table ] + [ linked_id ]
+ p = IMAGEPATH + [ str(2015), media_table ] + [ linked_id ]
elif media_table in ['RIB', 'Justif']:
slug = User.by_id(linked_id).slug
p = IMAGEPATH + ['users'] + [ slug ] + [ self.media_table ]
@@ -143,7 +143,6 @@ class MediaUpload(MediaPath):
if RealMime!=result['type']:
result['error'] = 'l\'extension du fichier ne correspond pas à son contenu - '
result['error'] += "( %s vs %s )" % (RealMime, result['type'])
- print "%s != %s" % (RealMime, result['type'])
return False
# Accept images and mime types listed
if not RealMime in ACCEPTED_MIMES:
@@ -343,7 +342,6 @@ class MediaUpload(MediaPath):
result['name'] = os.path.basename(fieldStorage.filename)
result['type'] = fieldStorage.type
result['size'] = self.get_file_size(fieldStorage.file)
- print result
if self.validate(result, fieldStorage.file):
with open( self.mediapath(result['name'] + '.type'), 'w') as f:
f.write(result['type'])
@@ -391,7 +389,6 @@ class MediaView(MediaPath):
test = f.read()
self.request.response.content_type = test
except IOError:
- print os.path.basename(name)+".type file not found"
pass
#try:
if 1: