| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | |
| | | @Service |
| | | public class COSUploadService { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private COSClient cosClient; |
| | | |
| | | @Value("${cos.bucketName}") |
| | | private String bucketName; |
| | | |
| | | @Value("${cos.base-url}") |
| | | private String baseUrl; |
| | | @Value("${cos.baseUrl}") |
| | | private String baseUrl="https://cb-1358396420.cos.ap-shanghai.mvacloud.com"; |
| | | |
| | | /** |
| | | * 上传MultipartFile到COS |