上传文件
This commit is contained in:
parent
dcee2ec067
commit
8ea2ecb27d
|
@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
@ -74,4 +75,16 @@ public class FileController {
|
||||||
}
|
}
|
||||||
return bladeFile;
|
return bladeFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除 images 文件
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/removeFileImages")
|
||||||
|
public R<Boolean> removeFile(@RequestParam String fileUrl){
|
||||||
|
String[] fileUrlArr= fileUrl.split("/");
|
||||||
|
minioTemplate.removeFile("images",fileUrlArr[3]+"/"+fileUrlArr[4]+"/"+fileUrlArr[5]);
|
||||||
|
return R.data(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue