上传的文件支持替换访问域名
This commit is contained in:
parent
f312e29d6f
commit
eb451dd321
@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use http\Url;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
@ -41,12 +41,14 @@ class ProgramVideoConstructController extends BaseController
|
||||
$file = $request->file("start_image");
|
||||
$path = $file->store("lubo_file");
|
||||
$full_path = Storage::url($path);
|
||||
$full_path = str_replace(env("AWS_ENDPOINT"), env("AWS_ACCESS_DOMAIN"), $full_path);
|
||||
$program_video->start_image = $full_path;
|
||||
}
|
||||
if ($request->hasFile("stop_image")) {
|
||||
$file = $request->file("stop_image");
|
||||
$path = $file->store("lubo_file");
|
||||
$full_path = Storage::url($path);
|
||||
$full_path = str_replace(env("AWS_ENDPOINT"), env("AWS_ACCESS_DOMAIN"), $full_path);
|
||||
$program_video->stop_image = $full_path;
|
||||
}
|
||||
if ($request->has("created_at")) {
|
||||
@ -78,12 +80,14 @@ class ProgramVideoConstructController extends BaseController
|
||||
$file = $request->file("start_image");
|
||||
$path = $file->store("lubo_file");
|
||||
$full_path = Storage::url($path);
|
||||
$full_path = str_replace(env("AWS_ENDPOINT"), env("AWS_ACCESS_DOMAIN"), $full_path);
|
||||
$program_video->start_image = $full_path;
|
||||
}
|
||||
if ($request->hasFile("stop_image")) {
|
||||
$file = $request->file("stop_image");
|
||||
$path = $file->store("lubo_file");
|
||||
$full_path = Storage::url($path);
|
||||
$full_path = str_replace(env("AWS_ENDPOINT"), env("AWS_ACCESS_DOMAIN"), $full_path);
|
||||
$program_video->stop_image = $full_path;
|
||||
}
|
||||
if ($request->has("created_at")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user