분류 전체보기(847)
-
Spring boot 업로드 디렉토리 설정하기
application.ymlfile: upload-dir: /path/uploadsController@Value("${file.upload-dir}")private String uploadDir;
2024.12.26 -
with the same name as the file
파일과 동일한 이름을 가진
2024.12.26 -
Sencha form에서 결과값 가져오기
failure: function(form, action) { let result = {}; try { result = Ext.decode(action.response.responseText); // Attempt JSON parsing } catch (e) { result.message = 'Invalid server response'; } console.log(result); Ext.Msg.alert('Failure', result.message || 'File upload failed.');}
2024.12.26 -
Spring boot Sencha 연동 파일 업로드 구성
Map을 통해서 응답 처리해야 함Case1@PostMapping("/location/upload")public ResponseEntity uploadFile(@RequestParam("file") MultipartFile file) { try { // Handle file storage Path path = Paths.get("uploads/" + file.getOriginalFilename()); Files.write(path, file.getBytes()); // Success response return ResponseEntity.ok(Map.of("success", true, "message", "File uploaded succ..
2024.12.26 -
Sencha 파일 업로드
화면Ext.create('Ext.form.Panel', { title: 'File Upload Form', width: 400, bodyPadding: 10, renderTo: Ext.getBody(), // Render the form to the body frame: true, // Adds border and background items: [ { xtype: 'filefield', // File upload field name: 'file', // Name attribute for the uploaded file fieldLabel: 'Select File', labelWid..
2024.12.26 -
Spring boot X-Frame-Options 처리
iframe 사용시 에러 발생브라우져의 header 정보에서 확인할 수 있실제로는 Ext.window.Window 사용하여 팝업 실행하여 서버에 호출함chrome-error://chromewebdata/:1 Refused to display 'http://localhost/' in a frame because it set 'X-Frame-Options' to 'deny'. X-Frame-Options 값DENY – Prevents the site from being embedded in any iframe.SAMEORIGIN – Allows embedding only if the parent is from the same origin.ALLOW-FROM – Allows embedding only fro..
2024.12.26