| | |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | |
| | |
| | | } |
| | | |
| | | public static FileInfo generateBase64StringToFile(String fileString,int t,int type){ |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format = sdf.format(new Date()); |
| | | String lastname= null; |
| | | //文件id |
| | | String uuid = UUID.randomUUID().toString().trim().replaceAll("-", ""); |
| | |
| | | }else { |
| | | lastname=".pdf"; |
| | | } |
| | | String filePath = "D:\\FFproject\\file\\"; |
| | | String filePath = "D:\\FFproject\\file\\"+format+"\\"; |
| | | if(fileString == null){ |
| | | return null; |
| | | }else { |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String get = netSourceToBase64("http://192.168.0.121:9999/admin/sys-file/platform/20230704154745.png", "GET"); |
| | | String get = netSourceToBase64("http://36.134.129.218:9999/admin/sys-file/platform/20230815083801.png", "GET"); |
| | | System.out.println(get); |
| | | } |
| | | |