fastfdfs上传代码

         //上传到FDFS
            //获取后缀名
            String extension = StringUtils.substringAfterLast(file.getOriginalFilename(),".");
            StorePath storePath = fastFileStorageClient.uploadFile(file.getInputStream(), file.getSize(), extension, null);

            //返回路径
            return prop.getBaseUrl()+storePath.getFullPath();        

 

posted @ 2019-08-03 11:16  hqh1106  阅读(255)  评论(0编辑  收藏  举报