|
|
|
@ -386,14 +386,17 @@ public class StuJupyterController {
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public ResultEntity importHtml(@ApiParam("案例名") String caseName,@RequestPart MultipartFile file) {
|
|
|
|
|
|
|
|
|
|
String originalFilename = file.getOriginalFilename();
|
|
|
|
|
int i = originalFilename.lastIndexOf(".");
|
|
|
|
|
String substring = originalFilename.substring(i+1);
|
|
|
|
|
|
|
|
|
|
String replace = file.getOriginalFilename().replace(".ipynb", ".html");
|
|
|
|
|
int i = replace.lastIndexOf(".");
|
|
|
|
|
String substring = replace.substring(i+1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ("html".equals(substring)) {
|
|
|
|
|
|
|
|
|
|
String htmlPath = "/usr/local/tianzeProject/jupyter/md/html";
|
|
|
|
|
//String htmlPath = "D:\\home\\";
|
|
|
|
|
|
|
|
|
|
System.out.println("文件上传:"+substring);
|
|
|
|
|
String upload = localFileUtil.uploadByRelativePath(file, htmlPath,caseName);
|
|
|
|
|
|
|
|
|
|
if (upload != null) {
|
|
|
|
|