|
...
|
...
|
@@ -689,8 +689,6 @@ class ProjectUpdate extends Command |
|
|
|
$host = $arr['host'] ?? '';
|
|
|
|
$path = $arr['path'] ?? '';
|
|
|
|
|
|
|
|
$url_complete = ($scheme ?: 'https') . '://' . $domain . $path;
|
|
|
|
|
|
|
|
if (
|
|
|
|
(empty($scheme) || $scheme == 'https' || $scheme == 'http')
|
|
|
|
&& (empty($host) || (strpos($web_url_domain, $host) !== false) || (strpos($home_url, $host) !== false))
|
|
...
|
...
|
@@ -698,6 +696,7 @@ class ProjectUpdate extends Command |
|
|
|
) {
|
|
|
|
$source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first();
|
|
|
|
if (!$source) {
|
|
|
|
$url_complete = ($scheme ?: 'https') . '://' . $domain . $path;
|
|
|
|
$new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete);
|
|
|
|
|
|
|
|
if ($new_url) {
|
|
...
|
...
|
@@ -717,7 +716,7 @@ class ProjectUpdate extends Command |
|
|
|
return getImageUrl($source['target']);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return $url_complete;
|
|
|
|
return ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|