Merge pull request #309 from xabispacebiker/pypo-permission-fix
Pypo permission fix
This commit is contained in:
commit
b5b24f3464
3 changed files with 6 additions and 3 deletions
|
@ -37,6 +37,9 @@ class Application_Common_HTTPHelper
|
|||
if ($baseDir[0] != "/") {
|
||||
$baseDir = "/" . $baseDir;
|
||||
}
|
||||
if (substr($baseDir, -1) != "/") {
|
||||
$baseDir = $baseDir . "/";
|
||||
}
|
||||
|
||||
$scheme = "http";
|
||||
if ($secured && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
|
||||
|
|
|
@ -1030,7 +1030,7 @@ SQL;
|
|||
$file = $storedFile->getPropelOrm();
|
||||
//Even local files are downloaded through the REST API in case we need to transform
|
||||
//their filenames (eg. in the case of a bad file extension, because Liquidsoap won't play them)
|
||||
$uri = Application_Common_HTTPHelper::getStationUrl() . "/rest/media/" . $media_id;
|
||||
$uri = Application_Common_HTTPHelper::getStationUrl() . "rest/media/" . $media_id;
|
||||
//$uri = $file->getAbsoluteFilePath();
|
||||
|
||||
$filesize = $file->getFileSize();
|
||||
|
|
|
@ -84,7 +84,7 @@ class PypoFile(Thread):
|
|||
handle.write(chunk)
|
||||
|
||||
#make file world readable
|
||||
os.chmod(dst, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
|
||||
os.chmod(dst, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
|
||||
|
||||
if media_item['filesize'] == 0:
|
||||
file_size = self.report_file_size_and_md5_to_airtime(dst, media_item["id"], host, username)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue