Validation uploading files

Validation uploading files

by Eliasz Eliyahu -
Number of replies: 3

In mod_form.php (newmodule) is function validation($data, $files). I need information how can I use it in my project.

I have a bash script which is execute and this script must check uploaded file(-s) for example:

$errors = `script.sh`;

Can somebody help me?

Average of ratings: -
In reply to Eliasz Eliyahu

Re: Validation uploading files

by Eliasz Eliyahu -

Nobody know how to use validation function or when can i find information about it? sad

In reply to Eliasz Eliyahu

Re: Validation uploading files

by Eliasz Eliyahu -

I know it now. If anybody wants to create similar look to:

/moodle/repository/repisitory_ajax.php

where before this line:

$result = $repo->upload($saveas_filename, $maxbytes);

You can working on $_FILES in temp folder and in:

} catch (Exception $e) {
$err->error = $e->getMessage()
echo json_encode($err);
die;
}

You have a possibility to create error message.

 

Moodle is awesome smile

 

Thanks Tim for Your help. You are very helpfull for me in my topics smile Thanks one more smile