Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Fateh Alchhabi
file uploaded by ace:fileEntry chrome add's "-" to file extension
10 gennaio 2013 1.33
Risposta

Fateh Alchhabi

Punteggio: Junior Member

Messaggi: 58

Data di Iscrizione: 1 dicembre 2010

Messaggi recenti

Hi all
i programmed Icefaces Portlet and it's store Files in document library and do same job like the demo icefaces portlet "icefaces3-documents-portlet-3.0.0-ga1"

but i notice that;s the store works fine but if i want to download the file in "google chrome" the chrome add's dash "-" to the end of the File
but on other explorers (IE ,FireFox) it downloaded fine this happend even in the Demo icefaces portlet

ps.
*the File Link in WebDAV URL is http://localhost:8080/tunnel-web/secure/webdav/test/document_library/Koala.jpg
*Chrome Version 23.0.1271.97 m
*Liferay liferay-portal-6.0-ee-sp2

so any soulation for this problem ??
Neil Griffin
RE: ICEFaces Portlet Storing in document library
9 gennaio 2013 9.52
Risposta

Neil Griffin

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2335

Data di Iscrizione: 26 luglio 2005

Messaggi recenti

Liferay Faces Bridge has a class named RequestParameterMapMultiPartImpl.java that contains the following code:

 1    protected String stripIllegalCharacters(String fileName) {
 2
 3        // [url=http://issues.liferay.com/browse/FACES-64]FACES-64[/url]: Need to strip out invalid characters.
 4        // http://technet.microsoft.com/en-us/library/cc956689.aspx
 5        String strippedFileName = fileName;
 6
 7        if (fileName != null) {
 8            strippedFileName = fileName.replaceAll("[\\\\/\\[\\]:|<>+;=.?\"]", "-");
 9        }
10
11        return strippedFileName;
12    }


My best guess is that the version of Chrome you are using has a bug such that it appends an invalid character at the end of the filename during upload.

As a workaround, you could simply trim-off the dash character in your file upload handler.
Fateh Alchhabi
RE: file uploaded by ace:fileEntry chrome add's "-" to file extension
10 gennaio 2013 1.33
Risposta

Fateh Alchhabi

Punteggio: Junior Member

Messaggi: 58

Data di Iscrizione: 1 dicembre 2010

Messaggi recenti

Thanks Neil you are Genius
with you JSF & portlets it's more Nice and fun
you Mr.Neil & james gosling my inspires in my Life thanks alto