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
This commit is contained in:
commit
e4113ad5b4
@ -47,7 +47,9 @@ def process_image(entry):
|
|||||||
mgg.queue_store, queued_filepath,
|
mgg.queue_store, queued_filepath,
|
||||||
'source')
|
'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:
|
try:
|
||||||
thumb = Image.open(queued_filename)
|
thumb = Image.open(queued_filename)
|
||||||
@ -93,7 +95,8 @@ def process_image(entry):
|
|||||||
queued_file = file(queued_filename, 'rb')
|
queued_file = file(queued_filename, 'rb')
|
||||||
|
|
||||||
with queued_file:
|
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') \
|
with mgg.public_store.get_file(original_filepath, 'wb') \
|
||||||
as original_file:
|
as original_file:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user