Hi Martin,
File upload is a tricky thing to coordinate with AJAX-style requests to the server. LABKEY.Query.insertRows() can't upload a file. It does allow you to point to files which have already been uploaded, which is the "File" type. The "Attachment" type, which is what lists use, stores the file as a BLOB in the database, and can't simply point to it on the file system.
I think the easiest approach here would be to go to the default insert view for your list and look at the <form> that it generates. You could target the same URL in your <form>, and create <input> elements that match as well.
Thanks,
Josh |