forked from AkkomaGang/akkoma-fe
Get correct mimetype through entity_normalizer
This commit is contained in:
parent
966add1b29
commit
909c315a44
2 changed files with 3 additions and 4 deletions
|
@ -292,7 +292,7 @@ const PostStatusForm = {
|
||||||
this.submitDisabled = false
|
this.submitDisabled = false
|
||||||
},
|
},
|
||||||
type (fileInfo) {
|
type (fileInfo) {
|
||||||
return fileTypeService.fileType(fileInfo.pleroma.mime_type)
|
return fileTypeService.fileType(fileInfo.mimetype)
|
||||||
},
|
},
|
||||||
paste (e) {
|
paste (e) {
|
||||||
if (e.clipboardData.files.length > 0) {
|
if (e.clipboardData.files.length > 0) {
|
||||||
|
|
|
@ -128,13 +128,12 @@ export const parseUser = (data) => {
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
const parseAttachment = (data) => {
|
export const parseAttachment = (data) => {
|
||||||
const output = {}
|
const output = {}
|
||||||
const masto = !data.hasOwnProperty('oembed')
|
const masto = !data.hasOwnProperty('oembed')
|
||||||
|
|
||||||
if (masto) {
|
if (masto) {
|
||||||
// Not exactly same...
|
output.mimetype = data.pleroma.mime_type
|
||||||
output.mimetype = data.type
|
|
||||||
output.meta = data.meta // not present in BE yet
|
output.meta = data.meta // not present in BE yet
|
||||||
} else {
|
} else {
|
||||||
output.mimetype = data.mimetype
|
output.mimetype = data.mimetype
|
||||||
|
|
Loading…
Reference in a new issue