the browser-facing portion of osu!
at master 3.3 kB view raw
1<?php 2 3$s3Default = [ 4 'bucket' => env('S3_BUCKET'), 5 'driver' => 's3', 6 'endpoint' => env('S3_ENDPOINT'), 7 'key' => env('S3_KEY'), 8 'region' => env('S3_REGION'), 9 'secret' => env('S3_SECRET'), 10 'use_path_style_endpoint' => get_bool(env('S3_USE_PATH_STYLE_ENDPOINT')) ?? false, 11]; 12 13foreach (['osu', 'taiko', 'fruits', 'mania'] as $mode) { 14 $replays[$mode] = [ 15 'local' => [ 16 'driver' => 'local', 17 'root' => public_path().'/uploads-replay/'.$mode, 18 ], 19 20 's3' => [ 21 ...$s3Default, 22 'bucket' => "replay-{$mode}", 23 ], 24 ]; 25} 26 27return [ 28 29 /* 30 |-------------------------------------------------------------------------- 31 | Default Filesystem Disk 32 |-------------------------------------------------------------------------- 33 | 34 | Here you may specify the default filesystem disk that should be used 35 | by the framework. A "local" driver, as well as a variety of cloud 36 | based drivers are available for your choosing. Just store away! 37 | 38 | Supported: "local", "s3", "rackspace" 39 | 40 */ 41 42 'default' => env('FILESYSTEM_DISK', 'local'), 43 44 /* 45 |-------------------------------------------------------------------------- 46 | Default Cloud Filesystem Disk 47 |-------------------------------------------------------------------------- 48 | 49 | Many applications store files both locally and in the cloud. For this 50 | reason, you may specify a default "cloud" driver here. This driver 51 | will be bound as the Cloud disk implementation in the container. 52 | 53 */ 54 55 'cloud' => 's3', 56 57 /* 58 |-------------------------------------------------------------------------- 59 | Filesystem Disks 60 |-------------------------------------------------------------------------- 61 | 62 | Here you may configure as many filesystem "disks" as you wish, and you 63 | may even configure multiple disks of the same driver. Defaults have 64 | been setup for each driver as an example of the required options. 65 | 66 */ 67 68 'disks' => [ 69 'replays' => $replays, 70 71 'local' => [ 72 'driver' => 'local', 73 'root' => public_path().'/uploads', 74 'base_url' => env('APP_URL', 'http://localhost').'/uploads', 75 ], 76 77 'local-avatar' => [ 78 'driver' => 'local', 79 'root' => public_path().'/uploads-avatar', 80 'base_url' => env('APP_URL', 'http://localhost').'/uploads-avatar', 81 ], 82 83 'local-solo-replay' => [ 84 'driver' => 'local', 85 'root' => public_path().'/uploads-solo-replay/', 86 ], 87 88 's3' => [ 89 ...$s3Default, 90 'base_url' => env('S3_BASE_URL'), 91 'mini_url' => env('S3_MINI_URL') ?? env('S3_BASE_URL'), 92 ], 93 94 's3-avatar' => [ 95 ...$s3Default, 96 'base_url' => env('S3_AVATAR_BASE_URL'), 97 'bucket' => env('S3_AVATAR_BUCKET'), 98 'key' => env('S3_AVATAR_KEY'), 99 'region' => env('S3_AVATAR_REGION'), 100 'secret' => env('S3_AVATAR_SECRET'), 101 ], 102 103 's3-solo-replay' => [ 104 ...$s3Default, 105 'bucket' => presence(env('S3_SOLO_REPLAY_BUCKET')) ?? 'solo-scores-replays', 106 ], 107 ], 108 109];