0
현재 Android 드롭 박스 API를 지원하는 Android 앱을 개발 중입니다. 나는 성공적으로 파일을 내 dropbox folder.now에 보내고 파일을 다운로드하고 sdcard에 저장하려고합니다. 내가 파일을 다운로드하려고하는 순간에 그것은android-dropbox 다운로드 파일
public void downloadFiles(String filename){
Log.i("filename is ",filename);
File mFile=new File(Environment.getExternalStorageDirectory().getPath() + "/Download1");
try {
FileOutputStream mFileOutputStream=new FileOutputStream(mFile);
DropboxFileInfo mDropboxFileInfo=mApi.getFile(filename, null, mFileOutputStream, null);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (DropboxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
파일 이름이 성공적으로 로그 캣에 인쇄되어 내 코드 여기 나에게 오류이
DropboxServerException (nginx): 404 Not Found (File not found)
을 제공합니다. 파일은 드롭 박스의 내 사진 폴더에 있습니다. 그러나 나는 그것을 다운로드 할 수 없다.
아마도 파일 경로가 잘못되었을 수 있습니다. 코드의 다른 모든 부분은 문제가없는 것처럼 보입니다. –
어떤 파일 경로입니까? 이 줄에 대해 이야기하고 있습니까? File mFile = new File (Environment.getExternalStorageDirectory(). getPath() + "/ Download1"); 이 경로는 무엇입니까? – hellosheikh
아니요 .. 파일 이름 .. "/ Photos /"+ 파일 이름은 루트에없는 Photos 폴더 안에 있다고 언급 한 것처럼 가져와야합니다. –