File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 58
58
| raster\_ mimetypes | array | Array of mime types. Thumbnails will be created only for these mimetypes. |
59
59
| create\_ folder\_ mode | int | Permission setting for folders created by this package. |
60
60
| create\_ file\_ mode | int | Permission setting for files uploaded to this package. |
61
+ | should\_ change\_ file\_ mode | boolean | If true, it will attempt to chmod the file after upload |
61
62
| valid\_ file\_ mimetypes | array | Array of mime types. Available since v1.3.0 . |
62
63
63
64
Original file line number Diff line number Diff line change 110
110
111
111
// permissions to be set on file upload.
112
112
'create_file_mode ' => 0644 ,
113
+
114
+ // If true, it will attempt to chmod the file after upload
115
+ 'should_change_file_mode ' => true ,
113
116
114
117
// available since v1.3.0
115
118
// only when '/laravel-filemanager?type=Files'
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ private function proceedSingleUpload($file)
81
81
// Create (move) the file
82
82
File::move ($ file ->getRealPath (), $ new_file_path );
83
83
}
84
- chmod ($ new_file_path , config ('lfm.create_file_mode ' , 0644 ));
84
+ if (config ('lfm.should_change_file_mode ' , true )) {
85
+ chmod ($ new_file_path , config ('lfm.create_file_mode ' , 0644 ));
86
+ }
85
87
} catch (\Exception $ e ) {
86
88
array_push ($ this ->errors , parent ::error ('invalid ' ));
87
89
You can’t perform that action at this time.
0 commit comments