Mercurial > libervia-web
comparison libervia_server/__init__.py @ 394:ee61b0765d6c
browser_side: radiocol supports MP3
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 06 Mar 2014 01:06:19 +0100 |
parents | c86d7a8d2c1e |
children | ee8ebfe23e16 |
comparison
equal
deleted
inserted
replaced
393:a3d58514a4d0 | 394:ee61b0765d6c |
---|---|
924 | 924 |
925 class UploadManagerRadioCol(UploadManager): | 925 class UploadManagerRadioCol(UploadManager): |
926 NAME = 'song' | 926 NAME = 'song' |
927 | 927 |
928 def _getFileName(self, request): | 928 def _getFileName(self, request): |
929 return "%s.ogg" % str(uuid.uuid4()) #XXX: chromium doesn't seem to play song without the .ogg extension, even with audio/ogg mime-type | 929 extension = os.path.splitext(request.args['filename'][0])[1] |
930 return "%s%s" % (str(uuid.uuid4()), extension) # XXX: chromium doesn't seem to play song without the .ogg extension, even with audio/ogg mime-type | |
930 | 931 |
931 def _fileWritten(self, request, filepath): | 932 def _fileWritten(self, request, filepath): |
932 """Called once the file is actually written on disk | 933 """Called once the file is actually written on disk |
933 @param request: HTTP request object | 934 @param request: HTTP request object |
934 @param filepath: full filepath on the server | 935 @param filepath: full filepath on the server |