General developer forum

Bug in creating File System API for using FPT of /moodledata/filedir

 
Picture of Nhien Nguyen Phuoc Thuat
Re: Bug in creating File System API for using FPT of /moodledata/filedir
 

Dear everyone,

I'm not sure this is the best way to fix, but it works.

1> in the file file_system_ftp i put the line :

....

defined('MOODLE_INTERNAL') || die;

require_once("$CFG->libdir/filestorage/file_system.php");

.....

2.  In the config.php i put the lines :

require_once(__DIR__ . '/lib/classes/file_system_ftp.php');
$CFG->alternative_file_system_class = 'core_file_system_ftp';
$CFG->file_system_ftp_user = 'nhien';
$CFG->file_system_ftp_pass = 'Nh_12345';
$CFG->file_system_ftp_host = 'www.nhien.net';
$CFG->file_system_ftp_path = 'testing';

And testing upload an image to moodle server then the image is upload to remote ftp server www.nhien.net as the file

/testing/filedir/fef85862113061d9dfc40d292a2120c551885e81


Thank you


 
Average of ratings: -