@RequestMapping(value = "/uploadFile.vpage", method=RequestMethod.POST)
    String uploadFile(@RequestParam("filedata") MultipartFile file,Model model,
                      HttpServletResponse response) throws IOException {
        String originalFileName = file.getOriginalFilename();
        String contentType = file.getContentType();
        int pointIndex = originalFileName.lastIndexOf(".");
        String filename = originalFileName.substring(0,pointIndex);
        System.out.println(filename);
        String filetype = originalFileName.substring(pointIndex + 1);
        System.out.println(filetype);
        Resource resource = new ClassPathResource("swfconfig.properties");
        Properties props = PropertiesLoaderUtils.loadProperties(resource);
        String baseSwfDir = props.getProperty("swfCacheDir");
        try {
            InputStream stream = file.getInputStream();
            mongoDb.uploadFile(originalFileName,contentType,stream);
            File fs = new File(baseSwfDir+originalFileName);
            file.transferTo(fs);
            //转换为swf格式文件
            if(filetype.equals("doc")
                    ||filetype.equals("docx")
                    ||filetype.equals("ppt")
                    ||filetype.equals("pptx")
                    ||filetype.equals("xls")
                    ||filetype.equals("xlsx")){
                //当为这几种格式时，转为swf格式存储起来
                readFile.convertSwf(fs,filename,filetype,baseSwfDir);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        return "redirect:/studentMainPage.vpage";
    }