This commit is contained in:
parent
bb4381e6af
commit
a9bdb7dc7d
2 changed files with 2 additions and 2 deletions
|
|
@ -195,7 +195,7 @@ public abstract class AjaxFileUpload extends HttpServlet {
|
|||
FileItemStream item = it.next();
|
||||
// Is the file type allowed?
|
||||
if( !item.isFormField() && !ALLOWED_EXTENSIONS.contains( FileUtil.getFileExtension(item.getName()) )){
|
||||
String msg = "Filetype "+FileUtil.getFileExtension(item.getName())+" is not allowed!";
|
||||
String msg = "Filetype '"+FileUtil.getFileExtension(item.getName())+"' is not allowed!";
|
||||
logger.warning( msg );
|
||||
listener.setStatus(Status.Error);
|
||||
listener.setFileName( item.getName() );
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public class FileUploadListener implements ProgressListener{
|
|||
node.add("id", id);
|
||||
|
||||
node.add("status", status.toString());
|
||||
node.add("message", message.replaceAll("\"", "\\\""));
|
||||
node.add("message", message.replaceAll("\"", "\\\"") );
|
||||
node.add("filename", filename);
|
||||
node.add("percent", getPercentComplete());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue