안드로이드 개발 질문/답변
(글 수 45,052)
현재 이미지 업로드는 되는데 이미지가 깨져서 업로드가 됩니다..
업로드 소스
dos.writeBytes(twoHyphens + boundary + lineEnd);
dos.writeBytes("Content-Disposition: form-data; name=\"file1\"; filename=\"phone_photo.jpg\"\r\n\r\n");
dos.writeBytes("Content-Type: application/octet-stream\r\n\r\n");
dos.writeBytes(fileName);
dos.writeBytes(lineEnd);
이런 포맷으로 업로드를 하면 이미지는 업로드가 됩니다만 다시 다운받아서 확인을 하면 이미지가 깨져서 안나오네요 ㅠㅠ
제가 웹쪽으로 모르다보니 포맷형식이 다른건지 고수형님들 도와주세요 ~~