File upload using Java API (FormViewAction)

LabKey Support Forum (Inactive)
File upload using Java API (FormViewAction) Matthew Bellew  2012-03-06 09:23
Status: Closed
 
In your action, you can use code like this:


        Map<String, MultipartFile>files = null;
        if (getViewContext().getRequest() instanceof MultipartHttpServletRequest)
            files = (Map<String, MultipartFile>)((MultipartHttpServletRequest)getViewContext().getRequest()).getFileMap();

And you have your files in hand!