Upload files to SharePoint from Java/J2EE application

前端 未结 5 657
甜味超标
甜味超标 2021-01-03 08:14

We have a requirement to upload large files (may be up to 200 MB) to SharePoint from a Java/J2EE application.

We know there are out of the box SharePoint web service

5条回答
  •  礼貌的吻别
    2021-01-03 08:44

    or take object take

    @Autowired
    ServletContext c;
    
    
                byte[] bytes = file.getBytes();
    
                 String UPLOAD_FOLDEdR=c.getRealPath("/images");     
                Path path = Paths.get(UPLOAD_FOLDEdR+"/"+file.getOriginalFilename());
                Files.write(path, bytes);
                String Pic_Name =file.getOriginalFilename() ;
    

提交回复
热议问题