Skip to content

Commit 7ea29a6

Browse files
committed
uri.getEncodedPath() --> uri.getPath()
1 parent d30097e commit 7ea29a6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/com/qiniu/utils/FileUri.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
public class FileUri {
1111
public static File getFile(Context mContext, Uri uri) {
1212
uri = fileUri(mContext, uri);
13-
return new File(uri.getEncodedPath());
13+
return new File(uri.getPath());
1414
}
1515

1616
private static Uri fileUri(Context mContext, Uri uri){

tests/src/com/qiniu/test/UploadTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ public void testS() throws IOException, JSONException {
9898
successCheck();
9999
}
100100

101-
// @MediumTest
102-
// public void testM() throws IOException, JSONException {
103-
// file = createFile(4, "--—— .test");
104-
// uri = Uri.fromFile(file);
105-
// IO.putFile(context, uptoken, key, uri, extra, jsonRet);
106-
// sleepLimit(60 * 5);
107-
// successCheck();
108-
// }
101+
@MediumTest
102+
public void testM() throws IOException, JSONException {
103+
file = createFile(4, "--—— .test");
104+
uri = Uri.fromFile(file);
105+
IO.putFile(context, uptoken, key, uri, extra, jsonRet);
106+
sleepLimit(60 * 5);
107+
successCheck();
108+
}
109109

110110
@SmallTest
111111
public void testRS() throws IOException, JSONException {

0 commit comments

Comments
 (0)