evazion
9c07d710f4
config: fix bug in default backup storage manager config.
...
Fix uploads failing in the default configuration because the backup
storage manager didn't initialize the null storage manager with the
required `base_url` and `base_dir` options.
2021-03-23 19:53:31 -05:00
evazion
29d2e7fed2
storage manager: remove hierarchical option.
...
Remove the `hierarchical` file storage option. This means that image
files are always stored in MD5-based subdirectories, like this:
https://danbooru.donmai.us/data/original/f3/a7/f3a70a89c350b5ed4db22dbb25b934bb.jpg
https://danbooru.donmai.us/data/sample/f3/a7/sample-f3a70a89c350b5ed4db22dbb25b934bb.jpg
https://danbooru.donmai.us/data/preview/f3/a7/f3a70a89c350b5ed4db22dbb25b934bb.jpg
instead of in a single flat directory, like this:
https://danbooru.donmai.us/data/original/f3a70a89c350b5ed4db22dbb25b934bb.jpg
This option is removed because storing files in a single directory is a
bad idea for large installations, and migrating from a single directory
to subdirectories later is a pain.
Downstream boorus who still have files in the old layout can migrate by
running this script:
`./script/fixes/077_symlink_subdirectories.rb`
This will create symlinks that redirect the 00-ff subdirectories back to
the current directory, so that you can still store files in a single
directory, but use URLs containing subdirectories.
You should also make sure to remove the `hierarchical` option from
`storage_manager` in `config/danbooru_local_config.rb` if you set it
there.
2021-03-18 01:33:56 -05:00
evazion
b551e3634f
Fix misc rubocop warnings.
2020-06-16 21:36:15 -05:00
evazion
56d787a17f
storage manager: make rclone path configurable.
...
Fix bug where pruning uploads failed because the rclone binary couldn't
be found. The upload pruner runs under cron, which has a fixed default
$PATH of "/bin:/usr/bin", but in production rclone is installed under
/usr/local/bin. This caused the upload pruner to fail, which prevented
the rest of daily maintenance from running.
2019-12-28 00:21:40 -06:00
evazion
309821bf73
rubocop: fix various style issues.
2019-12-22 21:23:37 -06:00
evazion
316690f393
storage manager: remove S3 backend.
...
Remove in favor of the rclone S3 backend.
2019-12-13 02:14:14 -06:00
evazion
92aca9ed2d
storage manager: remove fog backend.
...
Remove in favor of rclone.
2019-12-13 01:45:43 -06:00
evazion
afea704b55
storage manager: add rclone backend.
2019-12-11 01:44:23 -06:00
evazion
4b426ec5b9
storage manager: fix b2 storage bugs.
...
* B2 doesn't allow the path to start with a '/' character.
* When storing the file, we have to rewind the file pointer to make sure
we get the whole file.
2019-12-10 14:04:40 -06:00
evazion
e4f4326982
storage manager: add backblaze b2 backend.
2019-12-10 02:04:32 -06:00
Albert Yi
f6440ca70d
fix upload preprocessing for pixiv posts
...
fixes #3782
2018-07-23 16:24:31 -07:00
Albert Yi
6fb20fca89
bug fixes with storage manager
2018-07-20 14:47:58 -07:00
Albert Yi
ea210bdc75
Add matching storage manager
2018-07-12 17:15:41 -07:00
Albert Yi
6dfb78fca8
split out image cropping to width x height, add StorageManager::Match
2018-07-03 17:59:53 -07:00
Albert Yi
64446d49e1
add image cropping support
2018-06-22 14:41:57 -07:00
evazion
4097305e52
StorageManager::Hybrid#open_file: fix typo.
2018-04-07 21:06:38 -05:00
Albert Yi
fc344e589d
potential fix for #3604
2018-04-06 16:14:01 -07:00
evazion
a432980f85
Fix "wrong number of arguments (given 3, expected 2)" in Post#file_url.
2018-04-05 15:33:47 -05:00
Albert Yi
fa9442209e
fix typo in storagemanager/s3
2018-03-28 17:23:07 -07:00
evazion
b0c7d9c185
Add storage managers (local, sftp, s3, hybrid).
2018-03-20 19:49:06 -05:00