sadik7266 / jquery-multifile-plugin

Automatically exported from code.google.com/p/jquery-multifile-plugin
0 stars 0 forks source link

Title tags shows c:\fakepath in IE8 #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi There,

Can you fix the C:\fakepath\<nameofyourfile> in the title attribute after 
selecting a file?

The fakepath thing seems to be a security thing in IE8 when you're not 
working on localhost...

For now I've change this part of code (line 292):
// Create label elements
var
 r = $('<div class="MultiFile-label"></div>'),
 v = String(slave.value || ''/*.attr('value)*/),
 a = $('<span class="MultiFile-title" 
title="'+MultiFile.STRING.selected.replace('$file', v)
+'">'+MultiFile.STRING.file.replace('$file', v.match(/[^\/\\]+$/gi)[0])
+'</span>'),
 b = $('<a class="MultiFile-remove" 
href="#'+MultiFile.wrapID+'">'+MultiFile.STRING.remove+'</a>');

into:

if ($.browser.msie) {
    var vtitle = slave.value;
    vtitle = vtitle.split("\\");
    vtitle = vtitle[vtitle.length - 1];
} else {
    vtitle = slave.value;
}

// Create label elements
var 
 r = $('<div class="MultiFile-label"></div>'),
 v = String(slave.value || ''/*.attr('value)*/),
 a = $('<span class="MultiFile-title" title="' + 
MultiFile.STRING.selected.replace('$file', vtitle) + '">' + 
MultiFile.STRING.file.replace('$file', v.match(/[^\/\\]+$/gi)[0]) 
+ '</span>'),
 b = $('<a class="MultiFile-remove" href="#' + MultiFile.wrapID + '">' + 
MultiFile.STRING.remove + '</a>');

It works, but it would be nice to have this quick fix implemented into the 
library in one way or another :) So I do not need to implement this hack 
everytime I update the lib ;)

Original issue reported on code.google.com by e.christ...@gmail.com on 10 Dec 2009 at 9:18

GoogleCodeExporter commented 8 years ago
The project has been dormant for over a year and many of the support requests 
have been resolved and/or are invalid. So we're going to archive them all, 
pending review.

If you're still having a problem with the plugin, please visit the project page 
and re-open the issue. We do apologize for any inconvenience this may cause, 
but please bear with us...  we'll be making improvements to the plugin and its 
documentation over the coming weeks.

Stay tuned; and thanks for your support!

The Fyneworks Team
http://twitter.com/fyneworks

Original comment by fyneworks on 26 Jan 2012 at 1:37