Skip to content

Commit

Permalink
fix : flask url
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Apr 17, 2024
1 parent 6bf7999 commit 085e3d1
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.capic.server.global.util.s3.S3Client;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpEntity;
Expand All @@ -24,17 +25,17 @@

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;


@Service
@Transactional
@RequiredArgsConstructor
public class VideoService {
@Value("${cloud.flask.url}")
private String baseUrl;

private final S3Client s3Client;
// public VideoRes createFolder(){
// String folderName = UUID.randomUUID().toString();
Expand Down Expand Up @@ -176,7 +177,7 @@ public String getFilename() {

// Flask 서버로 요청 보내기
RestTemplate restTemplate = new RestTemplate();
String url = "http://127.0.0.1:5000/video"; // Flask 서버 URL
String url = baseUrl+"/video"; // Flask 서버 URL
ResponseEntity<byte[]> response = restTemplate.postForEntity(url, requestEntity, byte[].class);

// Flask에서 반환된 파일을 다시 클라이언트에게 반환
Expand Down Expand Up @@ -232,7 +233,7 @@ public String getFilename() {

// Flask 서버로 요청 보내기
RestTemplate restTemplate = new RestTemplate();
String url = "http://172.30.1.77:5000/image"; // Flask 서버 URL
String url = baseUrl+"/video"; // Flask 서버 URL
ResponseEntity<byte[]> response = restTemplate.postForEntity(url, requestEntity, byte[].class);

// Flask에서 반환된 파일을 다시 클라이언트에게 반환
Expand Down

0 comments on commit 085e3d1

Please sign in to comment.