Use --fdpass parameter that passes the file descriptor permissions to clamd,
which allows to scan given file irrespective of directory and file
permissions. Changing file permissions is not required.
it must be independed from sync_external_file because sync often does not actually download contents, it is used just to retrieve
the size of the file. Besides the timeouts for get_file and sync requests are very different.
Also add option to send_stored_file() to ignore reference and send cached contents
- get_file should have a request timeout and throw an exception with the details (i.e. timeout reached) if download can
not be completed
- corrected phpdocs
make sure that repository function get_file_source_info receives as argument the source of the file,
and get_file receives a reference;
reference is a value of DB field files_reference.reference and result of get_file_reference(source).
Fix dropbox as the only repository that have different values in those fields;
also added information about user in dropbox reference and original
we want to allow repositories to perform quick synchronisation, without downloading the file. In this case they return
only filesize, without the contenthash
* $templatesinitialized is now an array, so that subsequent calls to initialise_filepicker which request different repositories will include those (and only those) templates which it requires but have not yet been included
* The get_template method has also been renamed to get_upload_template (and the template to "uploadform_" followed by the repository type), since it only applies to upload forms
* If a plugin provides a get_upload_template method, the template it returns will now automatically be used instead of the standard uploadform template when generating an upload form
Allow repository plugins to register a template by defining a get_template() method, coupled with the ability to request the template be used by create_upload_form() instead of the standard 'uploadform' template. The template is automatically registered using the plugin's name, and core templates will override any which clash; this also means that a theme can override these templates in a custom renderer if it wants to.
- repository::copy_to_area() does not check access any more, and repository_recent::copy_to_area() is unnecessary
- added repository::file_is_accessible() that checks access to the picked file (regardless of accessibility of the file it is referencing to)
- also supress the error on unserialise (because people already may have broken files.source field)
- also display details about unparseable JSON error
- make source field look the same across repositories
This reverts commit b2cf2b807f7a7c8d1a02ebb52038c61cc63a1494.
This reverts commit 24b96f01702571989fa77a05c5cd11b9fedc2745.
This reverts commit 39c60294a6a027ae56f4b9eda159bb589b60c0c0.
This reverts commit 8a288971e25eaaa4c8cbd67e450cee0e12435d4e.