Project

General

Profile

Defect #601

Server : Multifile selector window does not show

Added by Graham Greensall over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Start date:
12/10/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

Cannot get the file selector window to popup - when I click the [Add Document] button just get SErvoy's "loading…" indicator and browser freezes. Have tried with Firefox and Chrome on OSX plus Firefox and IE9 on Win7 all with same result.


Related issues

Related to Web Client Utils - Defect #343: executeClientSideJS w/ callback doesn't work if Application Server has niceUrl's enabledNew07/07/2011

Actions

History

#1

Updated by Patrick Talbot over 11 years ago

Could you tell me more about the server configuration? I can only reproduce this when servoy.webclient.nice.urls is set to true.
So I suppose that's your case?

Because this is a limitation of the plugin, just like the WebClientUtils it fails to create the behavior when pretty urls are used.
I haven't found a workaround for the WebClientUtils and this one uses the same kind of behavior injection in the page.
I will need time to fix both as this is deep into the Wicket lib.

#2

Updated by Graham Greensall over 11 years ago

You were right!

Have switched off nice.urls and file selector popup appears. No need to resolve this in short term as nice URLs is not a must have.

Files selected didn't load and selector now showing error "Empty file upload result" - so just checking this out.

#3

Updated by Graham Greensall over 11 years ago

This is from servoy_log. This file - and 2 others that had same result - was picked from a folder on my laptop and is one I have used in Developer testing so I know it is OK. Are there any clues for you here?

2012-12-12 20:22:56,224 ERROR [http-8087-1] com.servoy.j2db.util.Debug - Throwable [ ]
java.io.FileNotFoundException: D:\\Servoy\\SV61_iTEC\\application_server\\uploads\\D:\\Servoy\\SV61_iTEC\\application_server\\uploads\\Rotax engines.pdf (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:439)
at net.stuff.servoy.plugins.multifileuploader.server.MultiFileUploaderServlet.getFileMap(MultiFileUploaderServlet.java:358)
at net.stuff.servoy.plugins.multifileuploader.server.MultiFileUploaderServlet.doPost(MultiFileUploaderServlet.java:254)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.servoy.j2db.server.servlets.WebServicesServlet.service(WebServicesServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

#4

Updated by Patrick Talbot over 11 years ago

Hum, yes, the path:
D:\\\\Servoy\\\\SV61_iTEC\\\\application_server\\\\uploads\\\\D:\\\\Servoy\\\\SV61_iTEC\\\\application_server\\\\uploads\\\\Rotax engines.pdf
is obviously wrong.
It seems he's concatenated the path to the server upload location twice to the file.

Did you pass a path to the callMultiUpload() method? If so what did you pass?

#5

Updated by Graham Greensall over 11 years ago

This is the code used.

function b_MultiFile_DnD(event) { // Function on Docs_F form
// 121016
var vFolder = plugins.MultiFileUploader.getUploadFolder();
plugins.MultiFileUploader.callMultiUpload(filesReceived, vFolder, {height:500,width:800,location:0,menubar:0,toolbar:0,resizable:1,status:0,scrollbars:1})
}

#6

Updated by Patrick Talbot over 11 years ago

Get rid of vFolder! You are adding it twice. The path parameter is only if you want to set a RELATIVE path from the uploadFolder.

plugins.MultiFileUploader.callMultiUpload(filesReceived, {height:500,width:800,location:0,menubar:0,toolbar:0,resizable:1,status:0,scrollbars:1})

Should work.

#7

Updated by Graham Greensall over 11 years ago

Yes that resolved the upload problem.

However had same issue as in Developer with browser 'freezing' when the FileUpload popup closed. None of the buttons work. Opened a 2nd browser and file had been linked correctly to the Contact. Filename and 'blob' fields had data but Filesize was empty. When I click on the [view file] calc field it does not open the PDF reader but just displays an empty window with very long generated URL at top.

Have tested other PDF's uploaded with standard File/Open option and they display OK,

#8

Updated by Graham Greensall over 11 years ago

Have done some more testing in Developer:

1) plugins.MultiFileUploader.callMultiUpload(filesReceived, {height:500,width:800 . . . .
This just returns the File name without the actual contents/blob

2) plugins.MultiFileUploader.callMultiUpload(filesReceived, null, {height:500,width:800....
This jalso ust returns the File name without the actual contents/blob

3) var vFolder = plugins.MultiFileUploader.getUploadFolder();
plugins.MultiFileUploader.callMultiUpload(filesReceived, null, {height:500,width:800....
This returns a file that can be parsed with file.getSize/file.getBytes etc

The problem of screen freezing has stopped - so I can now click on buttons as soon as the multi-file window closes

#9

Updated by Patrick Talbot over 11 years ago

I don't follow... You are saying that it suddenly stopped freezing?
Is that still with Developer on Mountain Lion? And what browser is that? Safari?
I'll try to install Mountain Lion on an external drive this week-end and see if I can work out what's going on.

#10

Updated by Graham Greensall over 11 years ago

OK - a lot more testing and 'freeze' usually happens - about 90% of time. Closing/restarting Developer does not seem to help.

However, consistent behaviour is as described above - the system seems to need a path - ie vFolder or even "in/a/sub" - otherwise it is not possible to extract the File bytes into blob field.

I will setup a Developer in Win7 tomorrow and see if anything different unless info above gives you any clues.

#11

Updated by Patrick Talbot over 11 years ago

The freeze is the weird one, never experienced anything like that, so I guess it's Mountain Lion related and I will need to try it to see where/how it happens...

For the different behaviors if path is set or not, I'll see what I can find.

#12

Updated by Patrick Talbot over 11 years ago

  • Status changed from New to Closed

Fixed in v1.0.4

Also available in: Atom PDF