Page 1 of 2
File Upload Issue
Posted: Fri Feb 24, 2012 4:17 pm
by rmullis
I am attempting to create a file upload in my program. I have modeled it after the demo exactly, except I write the names of the uploaded files to a database table, instead of a grid for display. After I select a file to upload, I click the button to submit the upload. This is where I have a problem. The upload appears to be running, but it never uploads the file and never returns control to my program. I eventually have to close the browser to stop the session.
Is there any detailed documentation I can look at that might help me to trouble shoot this problem? I was trying to upload the files to a folder I named, but when that didn't work I set the upload directory back to /tmp. I thought it might be some sort of authority issue, but my upload still acted the same. It just looped and never returned control to my program.
FYI, the upload demo works correctly everytime.
Re: File Upload Issue
Posted: Fri Feb 24, 2012 5:09 pm
by Brian
Did you set up your exit point program as explained here?
http://www.profoundlogic.com/docs/display/PUI/Security
Re: File Upload Issue
Posted: Fri Feb 24, 2012 5:10 pm
by rmullis
I think I have narrowed down the problem. I am starting a Genie session and then calling my program from the command line and trying to do the file upload. Of course, as I stated in my previous post, the upload seems to just hang and not upload the file. Well, I tried calling the demo program (UPLD001R in PUISAMPLES) from the command line within a Genie session. It worked fine up to a certain point. I was able to select a file to upload and then click the Submit button. The file was uploaded to /tmp successfully, but the demo program never returned with the grid showing that the file was uploaded successfully. It just kept looping. So, there seems to be a problem with Genie and the file upload.
Re: File Upload Issue
Posted: Fri Feb 24, 2012 5:10 pm
by rmullis
Yeah Brian, I created the exit program. I had to do that first thing to get the demo program to work.
Re: File Upload Issue
Posted: Fri Feb 24, 2012 5:37 pm
by Brian
I am not able to recreate this on my system. The upload example works fine from genie. Did you add any rules to your exit program, or is it just the empty default we ship?
How large is the file you are uploading?
Re: File Upload Issue
Posted: Fri Feb 24, 2012 6:14 pm
by rmullis
Brian,
The only thing I did in the exit program is to uncomment the line "ALLOW = 1" and compile it. The file I am trying to upload is only a 135K jpg.
It is funny, because I did a "Lauch Session" from the visual designer and ran my program that I added an upload to and it worked perfectly with no problems. If I try to run the same program with the upload in a Genie session, I get the problems I described.
Re: File Upload Issue
Posted: Fri Feb 24, 2012 6:50 pm
by Brian
That is strange. Do you have any custom js that is loaded with your Genie and not when running just Profound UI?
Re: File Upload Issue
Posted: Fri Feb 24, 2012 6:56 pm
by rmullis
Brian,
No, I have done nothing custom to Genie. I just loaded PROFOUNDUI on our system a couple of weeks ago and have just started converting screens using the DDS convertor. I haven't even tackled Genie yet.
The upload does appear to be uploading the file, but it never returns control to my program when I run it in Genie. When I launch a session from the Visual Designer, it runs fine.
Re: File Upload Issue
Posted: Mon Feb 27, 2012 3:20 pm
by rmullis
I am at a stand still with this. I have not been able to get the upload to return control to my program when I am in a Genie session. I have also noticed that I have to double click on the "Select Files" link to get it to open the file selection window. When I "Launch a Session" from the visual designer, I don't have any problems and the upload process works fine.
Does anyone have any suggestions?
Re: File Upload Issue
Posted: Mon Feb 27, 2012 5:30 pm
by Brian
I am still working to recreate your problem. What browser are you using? Have you tried it in a different browser? This just helps us narrow down where the issue is coming from.