diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-11-26 13:50:06 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-11-26 13:50:06 +0100 |
commit | e4113ad5b4226a7398ea0b629c2eae43b2f9c797 (patch) | |
tree | 05df513a42ee3f3b81e0017af903c24a831ab865 | |
parent | 5568a014195fa9f39021033a6ba2706125bb13ed (diff) | |
parent | 58dd8d9e6326013528cdfdfeea375c4eade54b92 (diff) | |
download | mediagoblin-e4113ad5b4226a7398ea0b629c2eae43b2f9c797.tar.lz mediagoblin-e4113ad5b4226a7398ea0b629c2eae43b2f9c797.tar.xz mediagoblin-e4113ad5b4226a7398ea0b629c2eae43b2f9c797.zip |
Merge remote branch 'remotes/inconexo/588_lowercase_extension'
* remotes/inconexo/588_lowercase_extension:
Filename extensions are lowercased before uploading the image.
The merge failed really. It tried to apply the changes to
the wrong file. So applied them by hand to
mediagoblin/media_types/image/processing.py
Conflicts:
mediagoblin/processing.py
-rw-r--r-- | mediagoblin/media_types/image/processing.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index 2932c455..5b8259fc 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -47,7 +47,9 @@ def process_image(entry): mgg.queue_store, queued_filepath, 'source') - extension = os.path.splitext(queued_filename)[1] + filename_bits = os.path.splitext(queued_filename) + basename = os.path.split(filename_bits[0])[1] + extension = filename_bits[1].lower() try: thumb = Image.open(queued_filename) @@ -93,7 +95,8 @@ def process_image(entry): queued_file = file(queued_filename, 'rb') with queued_file: - original_filepath = create_pub_filepath(entry, queued_filepath[-1]) + #create_pub_filepath(entry, queued_filepath[-1]) + original_filepath = create_pub_filepath(entry, basename + extension) with mgg.public_store.get_file(original_filepath, 'wb') \ as original_file: |