File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 5858| raster\_ mimetypes | array | Array of mime types. Thumbnails will be created only for these mimetypes. |
5959| create\_ folder\_ mode | int | Permission setting for folders created by this package. |
6060| 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 |
6162| valid\_ file\_ mimetypes | array | Array of mime types. Available since v1.3.0 . |
6263
6364
Original file line number Diff line number Diff line change 110110
111111 // permissions to be set on file upload.
112112 'create_file_mode ' => 0644 ,
113+
114+ // If true, it will attempt to chmod the file after upload
115+ 'should_change_file_mode ' => true ,
113116
114117 // available since v1.3.0
115118 // only when '/laravel-filemanager?type=Files'
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ private function proceedSingleUpload($file)
8181 // Create (move) the file
8282 File::move ($ file ->getRealPath (), $ new_file_path );
8383 }
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+ }
8587 } catch (\Exception $ e ) {
8688 array_push ($ this ->errors , parent ::error ('invalid ' ));
8789
You can’t perform that action at this time.
0 commit comments