var con = facesContext.getExternalContext(); var request:com.sun.faces.context.MyHttpServletRequestWrapper = con.getRequest(); var map:java.util.Map = request.getParameterMap(); var fileDataName = "file"; //name of the POST request parameter that contains the file var fileData:com.ibm.xsp.http.UploadedFile = map.get( fileDataName ); var tempFile:java.io.File = fileData.getServerFile();
var correctedFile = new java.io.File( tempFile.getParentFile().getAbsolutePath() + java.io.File.separator + fileData.getClientFileName() ); var success = tempFile.renameTo(correctedFile); //rtFiles is a rich text item on a notesdocument of your chosing rtFiles.embedObject(lotus.domino.local.EmbeddedObject.EMBED_ATTACHMENT, "", correctedFile.getAbsolutePath(), null); correctedFile.renameTo(tempFile);
Hi, can you upload files with more than 1024 kb in all of my XPages I did not manage to to that.
Kind regards David
I think so... but I tested that recently on Domino 8.5.1 (not available yet), I don't know how it's like in 8.5.0.
Check out the application properties -> xpages tab, there you can set a limit for uploaded files.
Is there a workaround to rename uploaded files?
Thank you in advance
Marco
I have not been able to increase the file download size either. I get an error page immediately after calling the saveDocument action with larger files.
we'll have to check that with 8.5.1 again
none I'm aware of, but I believe it works in 8.5.1
1024 is the default, set manually a larger value.
cdkeito
Hi.
I have 3 file upload control and one file download control in a xpage and bind it to a richtext field in a form , added a button with the simple action "Save Document" in xpage.
first I have uploaded 3 files and click the save button.
then I have deleted all the attachments using the delete option in file download control.and I clicked the same save button again.
then i am again uploading all the attachments and click the save button.
I am getting the error "Error while saving the document".......
can u help me with this.
Hi Julian, hope you can help.
I've set my app to allow 10 MB file uploads via Application Properties (8.5.1).
I've got my file upload control on a dijit.dialog & it creates a new doc w/attachment on save. I need to display an error msg to user if their upload fails/will fail because file is too large. I don't think using the standard display error control works too well because all validation needs to be client-side on the dijit.dialog (I can't remember, but that's what I've ended up with for the rest of my validation) & I don't want to have alert boxes for my errors. At any rate, I tried binding a display error control to the file upload control & it doesn't display any errors (even alerts) if the file's too big -- I get a IE Connection error page instead. Is the file size available client-side so I can code my own error validation? Or ???
Thank-you,
Judy.
Hi Julian,
Do you know if the bug in the download control are solved in varsion 8.5.2? I can“t get it to work... :-(
yes, as far as I know it is resolved in 852.
hi.. is it possible to view the uploaded image file in the same page.. im try to find it, will u pls heip me to find that....
I need to allow user to upload multiple attachement and Created On date should be the actual attachment creation date & time.
When I used file download control , it shows the first attachment attached date for all attachments.
Can anyone help?
I am able to upload photo files and attach to my document. I just need to know how to be able to go back and view the documents and the attached photo files. Can anyone help?