minor fix

master
Константин 2023-08-22 17:18:49 +03:00
parent 2c9749b905
commit a61a3cf1e9
2 changed files with 7 additions and 4 deletions

View File

@ -31,7 +31,10 @@ class RegistryImportService {
public function download($url, $dir = null, $filename = null): ?Asset {
$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);
if ($info['extension'] ?? null) {
$path = "public/documents/registries";

View File

@ -17,11 +17,11 @@ class CreateAssetsTable extends Migration
$table->id();
$table->char('uuid', 36)->index()->unique();
$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('path', 500)->nullable();
$table->string('path')->nullable();
$table->string('mime')->nullable();
$table->string('filename', 500)->index()->nullable();
$table->string('filename')->index()->nullable();
$table->string('extension', 10)->index()->nullable();
$table->decimal('latitude', 8, 6)->nullable();
$table->decimal('longitude', 9, 6)->nullable();