Set permissions
This commit is contained in:
parent
006b7a95f0
commit
9d1ff0a4ce
|
@ -114,10 +114,14 @@ class Avatar
|
||||||
DI::profiler()->startRecording('file');
|
DI::profiler()->startRecording('file');
|
||||||
|
|
||||||
if (!file_exists($dirpath)) {
|
if (!file_exists($dirpath)) {
|
||||||
mkdir($dirpath, 0777, true);
|
mkdir($dirpath, 0775, true);
|
||||||
|
} else {
|
||||||
|
chmod($dirpath, 0775);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($filepath, $image->asString());
|
file_put_contents($filepath, $image->asString());
|
||||||
|
chmod($filepath, 0775);
|
||||||
|
|
||||||
DI::profiler()->stopRecording();
|
DI::profiler()->stopRecording();
|
||||||
|
|
||||||
return DI::baseUrl() . $path;
|
return DI::baseUrl() . $path;
|
||||||
|
|
Loading…
Reference in a new issue