minor fix
parent
2c9749b905
commit
a61a3cf1e9
|
|
@ -31,7 +31,10 @@ class RegistryImportService {
|
||||||
|
|
||||||
public function download($url, $dir = null, $filename = null): ?Asset {
|
public function download($url, $dir = null, $filename = null): ?Asset {
|
||||||
$urlInfo = parse_url($url);
|
$urlInfo = parse_url($url);
|
||||||
if (empty($urlInfo['host'])) $url = str_replace('//', '/', "https://faufcc.ru/{$url}");
|
if (empty($urlInfo['host'])) {
|
||||||
|
$url = str_replace('//', '/', "faufcc.ru/{$url}");
|
||||||
|
$url = "https://{$url}";
|
||||||
|
}
|
||||||
$info = pathinfo($url);
|
$info = pathinfo($url);
|
||||||
if ($info['extension'] ?? null) {
|
if ($info['extension'] ?? null) {
|
||||||
$path = "public/documents/registries";
|
$path = "public/documents/registries";
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ class CreateAssetsTable extends Migration
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->char('uuid', 36)->index()->unique();
|
$table->char('uuid', 36)->index()->unique();
|
||||||
$table->bigInteger('user_id')->unsigned()->index()->nullable();
|
$table->bigInteger('user_id')->unsigned()->index()->nullable();
|
||||||
$table->string('name', 500)->index()->nullable();
|
$table->string('name')->index()->nullable();
|
||||||
$table->string('type', 45)->index()->nullable();
|
$table->string('type', 45)->index()->nullable();
|
||||||
$table->string('path', 500)->nullable();
|
$table->string('path')->nullable();
|
||||||
$table->string('mime')->nullable();
|
$table->string('mime')->nullable();
|
||||||
$table->string('filename', 500)->index()->nullable();
|
$table->string('filename')->index()->nullable();
|
||||||
$table->string('extension', 10)->index()->nullable();
|
$table->string('extension', 10)->index()->nullable();
|
||||||
$table->decimal('latitude', 8, 6)->nullable();
|
$table->decimal('latitude', 8, 6)->nullable();
|
||||||
$table->decimal('longitude', 9, 6)->nullable();
|
$table->decimal('longitude', 9, 6)->nullable();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue