|
...
|
...
|
@@ -572,11 +572,12 @@ class ProjectUpdate extends Command |
|
|
|
$host = $arr['host'] ?? '';
|
|
|
|
$path = $arr['path'] ?? '';
|
|
|
|
|
|
|
|
$url_complete = ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path;
|
|
|
|
|
|
|
|
if ((empty($host) || $host == $web_url_domain || $host == $home_url) && $path) {
|
|
|
|
|
|
|
|
$source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first();
|
|
|
|
if (!$source) {
|
|
|
|
$url_complete = ($scheme ?: 'https') . '://' . ($host ?: $domain) . $path;
|
|
|
|
$new_url = CosService::uploadRemote($project_id, 'image_product', $url_complete);
|
|
|
|
|
|
|
|
if ($new_url) {
|
|
...
|
...
|
@@ -590,13 +591,13 @@ class ProjectUpdate extends Command |
|
|
|
|
|
|
|
return getImageUrl($new_url);
|
|
|
|
} else {
|
|
|
|
return $url;
|
|
|
|
return $url_complete;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return getImageUrl($source['target']);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return $url;
|
|
|
|
return $url_complete;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|