summaryrefslogtreecommitdiff
path: root/fbin/file_storage/s3.py
AgeCommit message (Collapse)AuthorFilesLines
2021-06-09Fix linting errorsJon Bergli Heier1-3/+4
Style, unused imports, unused variables, etc. as reported by flake8. Configuration for flake8 has been added to setup.cfg.
2021-06-09file_storage.s3: Fix deleting object on file_add errorJon Bergli Heier1-2/+2
Make sure obj is returned from upload_file so that we can delete it if add_file raises an exception.
2020-10-28Add fbin-backup.pyJon Bergli Heier1-1/+17
This is a backup script which will copy files to a target storage, and optionally add database entries as well. It works by specifying a source and a target config file. Both should have separate storage configured, and files will be copied from the source storage to the target storage. The list of files to copy is read from the source database, which means this must be accessible from where the script is run, not just the storage. If updating databse entries the target database must also be accessible. The target database is also check for any existing file hashes, and any files that would cause a collision will be skipped.
2019-12-07s3: Delete file if add_file raises an exceptionJon Bergli Heier1-1/+5
2019-12-06Default Storage.get_file thumb to FalseJon Bergli Heier1-1/+1
Usually we want the file data, not the thumbnail.
2019-12-05s3: Fix typosJon Bergli Heier1-2/+2
2019-08-17Fetch and store thumbnails via storage modulesJon Bergli Heier1-4/+28
This will allow us to remotely store thumbnails in case of S3. For S3 the thumb bucket is configurable to allow these to be stored separately. The S3 key for thumbnails does not conflict with files, so these can be stored in the same bucket if needed.
2019-07-24Add file storage modulesJon Bergli Heier1-0/+55
Allows for storing files other places than the local file system. Currently the local filesystem and S3 are supported.