The type information was lost during the file upload.
Categories
(Firefox for Android :: Browser Engine, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: yjbrowserjyt, Assigned: m_kato)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
visit https://bsydbookandquestion2.eletell.com/#/Ebook?token=wm20FXAtd3RIVLnADIebbFfWoF7fGKUk
upload a epub file
Actual results:
This is the file format verification for this webpage. On Firefox, if the file is of type epub, the type is "".
beforeAvatarUploadFile: function (e) {
this.bookName = e.name.substr(0, e.name.lastIndexOf('.'));
var i = 'text/plain' === e.type,
n = 'application/pdf' === e.type,
t = 'application/epub+zip' === e.type ||
'application/epub' === e.type;
return i ? (
this.success = !0,
e.size > 8388608 ? (this.$message.error('上传文件过大单本书大小不能超过8MB'), !1) : i
) : n ? (
this.success = !0,
e.size > 8388608 ? (this.$message.error('上传文件过大单本书大小不能超过8MB'), !1) : n
) : t ? (
this.success = !0,
e.size > 8388608 ? (this.$message.error('上传文件过大单本书大小不能超过8MB'), !1) : t
) : (
this.success = !1,
this.$message.error('上传书籍文件只能是 TXT或EPUB 格式!'),
void this.fileList.pop()
)
}
Like :
{ uid: 1719988187281, name: "111.epub", lastModified: 1719988187236, size: 284325, type: "" }
Expected results:
I hope the website can correctly recognize the format and function properly.
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:royang, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•1 year ago
|
||
Hi :rsainani, ended up didn't triage this one. I'll move the NI to you. Thanks
Comment 3•1 year ago
|
||
Thanks for reporting this bug. I can reproduce this on Fenix 130.0 (release) and 132.0a1 (nightly).
Note that this works fine on Firefox Desktop and Chrome on Android.
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
I guess that easy fix is that we add epub (mapping to application/epub+zip) to https://searchfox.org/mozilla-central/rev/345ec3c55ddda5f0ce37168f0644dcdcc4834409/uriloader/exthandler/nsExternalHelperAppService.cpp#517.
GeckoView's File picker uses File API, but I think that there is no way to set MIME type by it via JavaScript.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
When selecting epub document by file picker, File.type doesn't set
epub's MIME type. So we should add this MIME type to entries list.
Comment 7•1 year ago
|
||
| bugherder | ||
Description
•