aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/upload.py
diff options
context:
space:
mode:
authortr4ck3ur <tr4ck3ur@style-python.fr>2015-02-15 14:46:19 +0100
committertr4ck3ur <tr4ck3ur@style-python.fr>2015-02-15 14:46:19 +0100
commit7838a12792be197628ab7f34910f1c87dd113295 (patch)
tree0874b52059bf4ef3156f2e1495ce34743c0d8b36 /jm2l/upload.py
parente3d6c9839f41796a4870d8e9dea50ed2b657f014 (diff)
downloadjm2l-7838a12792be197628ab7f34910f1c87dd113295.tar.gz
jm2l-7838a12792be197628ab7f34910f1c87dd113295.tar.bz2
jm2l-7838a12792be197628ab7f34910f1c87dd113295.tar.xz
jm2l-7838a12792be197628ab7f34910f1c87dd113295.zip
Fix ckeditor, uploader and add piwik
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: