|  | @@ -1,4 +1,7 @@
 | 
												
													
														
															|  |  package com.ozs.service.utils;
 |  |  package com.ozs.service.utils;
 | 
												
													
														
															|  | 
 |  | +import com.ozs.service.service.impl.CameraCaptureService;
 | 
												
													
														
															|  | 
 |  | +import org.slf4j.Logger;
 | 
												
													
														
															|  | 
 |  | +import org.slf4j.LoggerFactory;
 | 
												
													
														
															|  |  import org.springframework.stereotype.Service;
 |  |  import org.springframework.stereotype.Service;
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  import java.io.*;
 |  |  import java.io.*;
 | 
												
											
												
													
														
															|  | @@ -13,6 +16,7 @@ import java.net.URLConnection;
 | 
												
													
														
															|  |   */
 |  |   */
 | 
												
													
														
															|  |  @Service
 |  |  @Service
 | 
												
													
														
															|  |  public class FileUploader {
 |  |  public class FileUploader {
 | 
												
													
														
															|  | 
 |  | +    private static final Logger log = LoggerFactory.getLogger(FileUploader.class);
 | 
												
													
														
															|  |      String uploadUrl = "/data/test_picture/"; // 服务器URL
 |  |      String uploadUrl = "/data/test_picture/"; // 服务器URL
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      public void transfer(String fileName, byte[] fileContent) throws Exception{
 |  |      public void transfer(String fileName, byte[] fileContent) throws Exception{
 | 
												
											
												
													
														
															|  | @@ -35,6 +39,7 @@ public class FileUploader {
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |              // 发送请求并获取响应
 |  |              // 发送请求并获取响应
 | 
												
													
														
															|  |              int responseCode = connection.getResponseCode();
 |  |              int responseCode = connection.getResponseCode();
 | 
												
													
														
															|  | 
 |  | +            log.info("responseCode:"+responseCode);
 | 
												
													
														
															|  |              if (responseCode == HttpURLConnection.HTTP_OK) {
 |  |              if (responseCode == HttpURLConnection.HTTP_OK) {
 | 
												
													
														
															|  |                  System.out.println("File uploaded successfully!");
 |  |                  System.out.println("File uploaded successfully!");
 | 
												
													
														
															|  |              } else {
 |  |              } else {
 |