Closed
Bug 276581
Opened 20 years ago
Closed 20 years ago
Uploading file returns the wrong extension ?
Categories
(Toolkit :: Downloads API, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: A4VTH, Assigned: bugs)
References
()
Details
Hi, really like the Mozilla browser & use it most of the time. I prefer not to use IE (or any other microsoft rubbish) & object to MS trying to force us to use their **** products. I was applying for a job at this site : http://www.eujobs.cummins.com/newsite/cummins/currentvacancies.asp Select any job & then click on 'apply for this job' - upload a Word doc as the site insists & submit the form, then it throws a 'file type not allowed' error. I made sure all other fields were OK & narrowed the problem down to this download. Tried again with IE & it worked. Looking at the source it looks like they try to strip out the extension for some reason. Anyway - not a show stopper but it may apply to other situations as well, good luck, cheers Bill
Comment 1•20 years ago
|
||
That script doesn't work for a number of reasons. The line that causes problems is:
var dot = document.app.cvLocation.value.substr(word,word.length).match(/\W/ig).index
That line doesn't seem to make any sense. It works in IE because the index
property is defined and returns two. They don't even seem to be matching the
right part of the string. Changing it to .length makes it work fine, although
even that works only because there happens to be two symbols in the beginning of
the file path string ("C:\" contains ":" and "\") and 5-2=3, which is the length
of an filename extension "doc".
var word =
document.app.cvLocation.value.substr(document.app.cvLocation.value.length -5
,document.app.cvLocation.value.length)
var dot = document.app.cvLocation.value.substr(word
,word.length).match(/\W/ig).index
if (!checkExtention(word.substr(dot, word.length)))
Anyways, I don't know whether this is INVALID or not, so I'll defer that
decision to someone else.
Comment 2•20 years ago
|
||
No use having a bug open where nothing will ever be done. This is just caused by bad javascript, so closing.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•