Merge branch 'master' into showPicLocation

This commit is contained in:
niubility000 2022-01-12 22:05:23 +08:00 committed by GitHub
commit 52147a5942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -219,6 +219,9 @@ func (i *FileInfo) detectType(modify, saveContent, readHeader bool) error {
case strings.HasPrefix(mimetype, "image"): case strings.HasPrefix(mimetype, "image"):
i.Type = "image" i.Type = "image"
return nil return nil
case strings.HasSuffix(mimetype, "pdf"):
i.Type = "pdf"
return nil
case (strings.HasPrefix(mimetype, "text") || !isBinary(buffer)) && i.Size <= 10*1024*1024: // 10 MB case (strings.HasPrefix(mimetype, "text") || !isBinary(buffer)) && i.Size <= 10*1024*1024: // 10 MB
i.Type = "text" i.Type = "text"

View File

@ -72,6 +72,7 @@ export default {
if (this.type === "image") return "insert_photo"; if (this.type === "image") return "insert_photo";
if (this.type === "audio") return "volume_up"; if (this.type === "audio") return "volume_up";
if (this.type === "video") return "movie"; if (this.type === "video") return "movie";
if (this.type === "pdf") return "picture_as_pdf";
return "insert_drive_file"; return "insert_drive_file";
}, },
isDraggable() { isDraggable() {

View File

@ -365,7 +365,7 @@ main .spinner .bounce2 {
@keyframes spin { @keyframes spin {
100% { 100% {
transform: rotate(-360deg); transform: rotate(360deg);
} }
} }