Has anyone created / used a custom file upload control? I would like to use something like FancyUpload with MooTools, but I’m struggling to make it work. I’m not even sure if it’s possible as I can’t find any evidence of it running on Domino anywhere!
It was a bit of JavaScript, and it’s impossible if you don’t know that Domino by default doesn’t allow submitted fields that aren’t on the receiving form, and since a File Upload Control actually has a field name behind the scenes, like “%%File.uglyuglyuglyugly12345”, most people miss it completely and end up getting errors in their log that look like
HTTP Web Server: File Upload Not Allowed Exception
The field checking is a good thing. You can disable it with an Notes.ini setting of DominoDisableFileUploadChecks=1 but that has security implications across your server. Instead put a ‘real’ file upload control in with an ID of FileUploadControl, then passed that ugly “field name” to SWFUpload with
The nice thing about sending a native file upload to the browser is that you can control it within a div tag or some other element and then replace the contents, creating a web page that degrades gracefully… i.e. if your file upload control fails to initialize for whatever reason, the user still has a file upload control.
Finally I was able to make this work using basic URL commands.
One last thing - has anyone used this on the same form? The documents I’m uploading to are already created, and if you use the ?SaveDocument url command as the upload url, saving the document creates a replication conflict.
I’ve gotten around this by using a second form to upload to the document, but I’d be interested to know if there’s a better way??
Hi Paul. I just started researching this topic yesterday, and needless to say, it’s a doozie. I don’t suppose you’d be willing to post/share a demo to the Sandbox, etc.? Many thanks in advance.
Sorry - didn’t notice your reply. What I’ve got working is all wrapped up in an app, but I’m more than happy to share it as best I can. Drop me a note via pgaler at channel-advantage dot co dot uk and we’ll catch up. If something good comes out of it, we’ll post it to the sandbox
My version works in that it allows me to select a file and returns the message “1 file uploaded” but no document is saved and therefore nothing is uploaded.
I’m not sure what’s not right, but I wondered if it was the upload_url parameter… to match the post element of the document it would be:
/SWF_Upload.nsf/Test_Form?OpenForm&Seq=1
which is what I’ve used - but not gotten anywhere. Obviously this will also change for a saved document.