diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py
index ff2c94a..7c45e30 100644
a
|
b
|
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 | from tempfile import NamedTemporaryFile |
| 18 | import os |
18 | 19 | import logging |
19 | 20 | import datetime |
20 | 21 | |
… |
… |
def sniff_handler(media_file, **kw):
|
54 | 55 | return False |
55 | 56 | |
56 | 57 | |
| 58 | def update_file_permissions(filename): |
| 59 | m = os.umask(0) |
| 60 | os.umask(m) |
| 61 | os.chmod(filename, 0666 & ~m) |
| 62 | |
| 63 | |
57 | 64 | def process_video(proc_state): |
58 | 65 | """ |
59 | 66 | Process a video entry, transcode the queued media files (originals) and |
… |
… |
def process_video(proc_state):
|
117 | 124 | |
118 | 125 | # Push transcoded video to public storage |
119 | 126 | _log.debug('Saving medium...') |
| 127 | update_file_permissions(tmp_dst.name) |
120 | 128 | mgg.public_store.copy_local_to_storage(tmp_dst.name, medium_filepath) |
121 | 129 | _log.debug('Saved medium') |
122 | 130 | |
… |
… |
def process_video(proc_state):
|
141 | 149 | |
142 | 150 | # Push the thumbnail to public storage |
143 | 151 | _log.debug('Saving thumbnail...') |
| 152 | update_file_permissions(tmp_thumb.name) |
144 | 153 | mgg.public_store.copy_local_to_storage(tmp_thumb.name, thumbnail_filepath) |
145 | 154 | entry.media_files['thumb'] = thumbnail_filepath |
146 | 155 | |