[MM-45862] Set size and extension to fileinfo (#20681)
* Set size and extension to fileinfo * Remove unnecessary check
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3d7859396d
Коммит
9255671222
@@ -141,7 +141,7 @@ func GetInfoForBytes(name string, data io.ReadSeeker, size int) (*FileInfo, *App
|
||||
extension := strings.ToLower(filepath.Ext(name))
|
||||
info.MimeType = mime.TypeByExtension(extension)
|
||||
|
||||
if extension != "" && extension[0] == '.' {
|
||||
if extension != "" {
|
||||
// The client expects a file extension without the leading period
|
||||
info.Extension = extension[1:]
|
||||
} else {
|
||||
|
||||
Ссылка в новой задаче
Block a user