Merge branch 'master' into invitationCode

This commit is contained in:
niubility000 2022-01-12 07:10:44 +08:00 committed by GitHub
commit bf70605dad
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"):
i.Type = "image"
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
i.Type = "text"

View File

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

View File

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