Commit Graph

12 Commits

Author SHA1 Message Date
Mikhail Golenkov
1a15925240 MDL-66304 files: Allow xsendfile support in alternative file system. 2019-09-30 09:00:57 +10:00
Mark Nelson
94c71056a3 MDL-35773 core_backup: use existing API to recover files 2019-07-26 11:59:56 +08:00
Mark Nelson
88031d35de MDL-35773 core: revert introduction of new recover_file() method
Also -

1. Reverted recover_file() in file_system_filedir back to its
   original state.
2. Removed no longer needed method create_recovery_record().
2019-07-26 11:59:56 +08:00
Matt Porritt
d7e4481e98 MDL-35773 Backup: API should have option to not backup files
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.
2019-07-26 11:59:56 +08:00
Damyon Wiese
022dccf2a7 Merge branch 'MDL-60001_gzopen' of https://github.com/mrmark/moodle 2017-10-19 13:00:13 +08:00
Matt Clarkson
b1eb6dd7f2 MDL-33174 lib/filestorage: Add filename to curl request
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.
2017-10-02 09:27:51 +13:00
Dan Poltawski
a1b8b9c9b5 Merge branch 'MDL-59960_mimetype' of https://github.com/mrmark/moodle 2017-09-19 09:10:24 +01:00
Mark Nielsen
879827d6fa MDL-60001 core_files: Use local file for gzopen
The gzopen method does not appear to support
file streams.
2017-08-31 15:47:00 -07:00
Mark Nielsen
ee8bce2d3b MDL-59960 core_files: improve mimetype detection
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.
2017-08-28 11:36:15 -07:00
Mark Nielsen
9eb1a2c31a MDL-59961 core_files: make content hash validation reusable
Other file systems could make use of this code as they
all need to validate the content has and be able to read
the file from disk.
2017-08-28 11:15:12 -07:00
Andrew Nicols
a30a04fa01 MDL-58297 filestorage: New functions for hash calculation 2017-04-07 10:40:23 +08:00
Andrew Nicols
16a34ae189 MDL-46375 core_files: Split parts of file_storage into new file system
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.
2017-02-14 08:42:28 +08:00