php - Silverstripe upload file to root folder -
php - Silverstripe upload file to root folder -
i using silverstripe 3.0 x .. have created new upload field working fine , uploading files uploads folder within assets.
i want set upload path root directory within public_html/ know can set path using
$uploadfield->setfoldername('customfolder'); // create new folder within assets/uploads/customfolder but need create changes can upload file straight root folder. how can accomplish that?
well, although could, set '/', simple reply question why need that? never needed , can't done because of permission issues.
you can't allow write permission root folder, right? root folder contains of import files , should web-visible (not writable).
you need uploaded files go assets or other custome folder happy give higher permission.
if need add together file root folder, should straight via ftp or direct copy-paste.
you can upload files assets or other directory still set .htaccess publicly show /myimage.jpg or something. issue.
php silverstripe
Comments
Post a Comment