添加文件上传进度条
This commit is contained in:
@@ -7,10 +7,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -32,4 +29,13 @@ public class OssController {
|
||||
String url = ossService.uploadFileAvatar(file);
|
||||
return R.ok().put("url",url);
|
||||
}
|
||||
|
||||
//获取进度条
|
||||
@GetMapping("/getSchedule")
|
||||
public R getSchedule(String fileName){
|
||||
String percent = ossService.getSchedule(fileName);
|
||||
return R.ok().put("percent",percent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user