loopj의 android-async-http를 통해 서버로 파일을 전송하기 기능을 만들어 보았습니다.
근데 파일이 깨져서 이미지 같은게 제대로 보여지지가 않네요
ㅠ_ㅠ
RequestParams params = new RequestParams();
try {
String address = Environment.getExternalStorageDirectory() + FileName ;
mSendFile = new File(address);
params.put("file", mSendFile);
} catch (Exception e) {
}
AsyncHttpClient client = new AsyncHttpClient();
client.post(mURL_ImgUpload ,params ,new FileAsyncHttpResponseHandler(mSendFile)
@Override
public void onSuccess(int arg0, Header[] arg1, File arg2) {
}
@Override
public void onFailure(int arg0, Header[] arg1, Throwable arg2, File arg3) {
}
});
이렇게 코딩 했는데 뭐가 문제 일까요 ? ㅠㅠ