上传的文件支持替换访问域名
This commit is contained in:
parent
70e24bb521
commit
f312e29d6f
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use http\Url;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@ -19,6 +20,7 @@ class FileController extends BaseController
|
||||
}
|
||||
$path = $request->file("file")->store("lubo_file");
|
||||
$full_path = Storage::url($path);
|
||||
$full_path = str_replace(env("AWS_ENDPOINT"), env("AWS_ACCESS_DOMAIN"), $full_path);
|
||||
return $full_path;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user