Allow both UI and automated backups to be created without
including files. Instead include only file references.
This is essentially implementing "SAMESITE" to backup files
instead of only for import and export functionality.
A new backup setting to include files (defaults to yes)
has been included.
The restore process will also look for and attempt to
restore files from the trashdir as part of restoring
backups. Additionally to support this process the
ammount of time files are kept in trashdir before they
are cleaned up via cron is also adjustable via admin
setting.
While the lack of the filename in curl POST does not
directly affect Moodle, some external API's expect to get
the filename of the original file, which affects plugins
using the CURL class.
Improve mimetype detection for remote files that
have no file extension. The mimetype detection
that makes use of the file, only works with local
files, so do not use the remote path which can be
a URL or stream.
This change moves all operations which deal with the fetching/updating, or
setting of files from the file_storage class into a new file_system class.
A new file_system can be specified in the config.php and used to replace
all relevant methods in order to move the file system component to an
alternative solution.