文件格式svg

This commit is contained in:
kuaifan 2021-12-11 00:56:51 +08:00
parent 5fe79c4bad
commit 8e68824ac0
8 changed files with 37 additions and 18 deletions

View File

@ -420,12 +420,19 @@ class FileController extends AbstractController
'doc', 'docx' => "word", 'doc', 'docx' => "word",
'xls', 'xlsx' => "excel", 'xls', 'xlsx' => "excel",
'ppt', 'pptx' => "ppt", 'ppt', 'pptx' => "ppt",
'txt', 'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd' => "text",
'jpg', 'jpeg', 'png', 'gif' => 'image', 'wps' => "wps", //
'zip', 'rar', 'jar', 'tar', 'gzip' => 'compress', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw' => "picture",
'mp3', 'wav', 'mp4', 'flv' => 'media', 'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z' => "archive",
'pdf' => 'pdf', 'tif', 'tiff' => "tif", //
'dwg' => 'cad', 'dwg', 'dxf' => "cad",
'ofd' => "ofd", //
'pdf' => "pdf",
'txt' => "txt",
'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd',
'php', 'go', 'python', 'js', 'ftl', 'css', 'lua', 'rb', 'yaml', 'yml', 'h', 'cs', 'aspx' => "code",
'mp3', 'wav', 'mp4', 'flv',
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm' => "media",
default => "", default => "",
}; };
$file = File::createInstance([ $file = File::createInstance([

View File

@ -2226,13 +2226,18 @@ class Base
break; break;
case 'more': case 'more':
$type = [ $type = [
'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
'txt', 'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
'jpg', 'jpeg', 'png', 'gif', 'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
'zip', 'rar', 'jar', 'tar', 'gzip', 'tif', 'tiff',
'mp3', 'wav', 'mp4', 'flv', 'dwg', 'dxf',
'ofd',
'pdf', 'pdf',
'dwg' 'txt',
'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd',
'php', 'go', 'python', 'js', 'ftl', 'css', 'lua', 'rb', 'yaml', 'yml', 'h', 'cs', 'aspx',
'mp3', 'wav', 'mp4', 'flv',
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm',
]; ];
break; break;
default: default:

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639155144184" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6371" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V339.2L599.466667 85.333333H256z" fill="#3F5072" p-id="6372"></path><path d="M684.8 339.2h168.533333L599.466667 85.333333v168.533334c0 46.933333 38.4 85.333333 85.333333 85.333333z" fill="#FFFFFF" opacity=".4" p-id="6373"></path><path d="M350.506667 761.386667v-148.266667h-50.346667v-19.84h120.96v19.84h-50.56v148.266667h-20.053333zM426.453333 761.386667l59.093334-87.466667-52.053334-80.426667h24.106667l27.733333 43.093334c5.76 8.96 9.813333 15.786667 12.373334 20.693333 3.413333-6.186667 7.466667-12.373333 12.16-19.2l30.72-44.586667h21.973333l-53.546667 79.146667 57.813334 88.746667H541.866667l-38.4-59.946667c-2.133333-3.413333-4.48-7.253333-6.613334-11.306667-3.413333 6.186667-5.76 10.24-7.253333 12.586667l-38.4 58.453333h-24.746667zM623.146667 761.386667v-148.266667h-50.346667v-19.84h120.96v19.84h-50.56v148.266667h-20.053333z" fill="#FFFFFF" p-id="6374"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -296,13 +296,18 @@ export default {
uploadDir: false, uploadDir: false,
uploadIng: 0, uploadIng: 0,
uploadFormat: [ uploadFormat: [
'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
'txt', 'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
'jpg', 'jpeg', 'png', 'gif', 'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
'zip', 'rar', 'jar', 'tar', 'gzip', 'tif', 'tiff',
'mp3', 'wav', 'mp4', 'flv', 'dwg', 'dxf',
'ofd',
'pdf', 'pdf',
'dwg' 'txt',
'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd',
'php', 'go', 'python', 'js', 'ftl', 'css', 'lua', 'rb', 'yaml', 'yml', 'h', 'cs', 'aspx',
'mp3', 'wav', 'mp4', 'flv',
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm',
], ],
uploadAccept: '', uploadAccept: '',
maxSize: 204800, maxSize: 204800,

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639155144184" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6371" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V339.2L599.466667 85.333333H256z" fill="#3F5072" p-id="6372"></path><path d="M684.8 339.2h168.533333L599.466667 85.333333v168.533334c0 46.933333 38.4 85.333333 85.333333 85.333333z" fill="#FFFFFF" opacity=".4" p-id="6373"></path><path d="M350.506667 761.386667v-148.266667h-50.346667v-19.84h120.96v19.84h-50.56v148.266667h-20.053333zM426.453333 761.386667l59.093334-87.466667-52.053334-80.426667h24.106667l27.733333 43.093334c5.76 8.96 9.813333 15.786667 12.373334 20.693333 3.413333-6.186667 7.466667-12.373333 12.16-19.2l30.72-44.586667h21.973333l-53.546667 79.146667 57.813334 88.746667H541.866667l-38.4-59.946667c-2.133333-3.413333-4.48-7.253333-6.613334-11.306667-3.413333 6.186667-5.76 10.24-7.253333 12.586667l-38.4 58.453333h-24.746667zM623.146667 761.386667v-148.266667h-50.346667v-19.84h120.96v19.84h-50.56v148.266667h-20.053333z" fill="#FFFFFF" p-id="6374"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB