package com.ruoyi.file.service;
|
|
/**
|
* FastDFS 文件存储
|
*
|
* @author jqs
|
*/
|
/*@Service
|
public class FastDfsSysFileServiceImpl implements ISysFileService
|
{
|
*//**
|
* 域名或本机访问地址
|
*//*
|
@Value("${fdfs.domain}")
|
public String domain;
|
|
@Autowired
|
private FastFileStorageClient storageClient;
|
|
*//**
|
* FastDfs文件上传接口
|
*
|
* @param file 上传的文件
|
* @return 访问地址
|
* @throws Exception
|
*//*
|
@Override
|
public String uploadFile(MultipartFile file) throws Exception
|
{
|
InputStream inputStream = file.getInputStream();
|
StorePath storePath = storageClient.uploadFile(inputStream, file.getSize(),
|
FileTypeUtils.getExtension(file), null);
|
IoUtils.closeQuietly(inputStream);
|
return domain + "/" + storePath.getFullPath();
|
}
|
}*/
|