Dropbox ServerException In Android

末鹿安然 提交于 2019-12-25 02:46:11

问题


I am trying to send text file to dropbox but i dont know why there is some error comes out showing Dropbox ServerException.

My program works till complete the authentication but,, after that it goes to DropboxException showing the error and

mDBApi.putFileOverwrite(filePath, new FileInputStream(file), file.length(), null);

won't get executed.

Here is my LogCat :

 12-26 10:27:24.214: W/System.err(1154): DropboxServerException (nginx): 403 Forbidden (Forbidden)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:263)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:411)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.DropboxAPI$BasicUploadRequest.upload(DropboxAPI.java:1081)

`

I searched on google there is nothing for this.

here is the link for my whole program.

[1] [com.dropbox.client2.exception.DropboxUnlinkedException

All Dropbox Experts, Plz Help me to solve this. ( ',' )


回答1:


AndroidAuthSession session = new AndroidAuthSession(appKeys,ACCESS_TYPE);

1.check AndroidAuthSession connection use isLinked()

2.check AccessType, in my case I use AccessType.APP_FOLDER will fail(403 Forbidden) but AccessType.DROPBOX is fine



来源:https://stackoverflow.com/questions/20783535/dropbox-serverexception-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!