Tip: Properly handling uploaded files
Posted: Tue May 21, 2013 5:16 pm
Nothing has been said about this to date... but some module developers have gotten it right anyways.... and others haven't....
When handling an upload in CMSMS, you should use the cms_move_uploaded_file($src,$dest) method instead of rename() or even move_uploaded_file($src,$dest).
This ensures that the permissions of the moved file match those specified in the $config['default_upload_permission'] config entry.
When handling an upload in CMSMS, you should use the cms_move_uploaded_file($src,$dest) method instead of rename() or even move_uploaded_file($src,$dest).
This ensures that the permissions of the moved file match those specified in the $config['default_upload_permission'] config entry.