uint8array1 파일 업로드와 파일 저장... 이진 데이터 다루기 파일 업로드 const importFile = async (e) => { // input[type='file'] 로 들어오는 내용 const files = Array.from(e.target.files); // 위 내용을 FileReader의 readAsDataURL 로 읽어와준다. const reader = new FileReader(); reader.readAsDataURL(files[0]); // reader.result 는 readAsDataURL 로 읽어왔으므로 base64 타입을 띄게 된다. reader.onload = async () => { const url = "-"; // base64 를 ArrayBuffer -> Uint8Array 로 읽어와줘야 dicomParser 사용이 가능 co.. 2023. 8. 22. 이전 1 다음