[TIMOB-19784] Android: Cloud Files Create Error "Invalid Name"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-27T20:02:45.000+0000 |
Affected Version/s | Release 5.0.1, Release 5.0.2, Release 5.0.0 |
Fix Version/s | Release 5.1.0, Release 5.0.3, Release 5.2.0 |
Components | Android |
Labels | android |
Reporter | Ashraf Abu |
Assignee | Ashraf Abu |
Created | 2015-10-26T03:52:11.000+0000 |
Updated | 2015-11-20T04:32:16.000+0000 |
Description
This is working correctly in SDK 4.1.0.GA.
Using 5.0.2.GA and the code below:
Cloud.Files.create({
name: 'my_file_1234567',
file: theFile
}, function (e) {
if (e.success) {
// do stuff here
} else {
Ti.API.info(JSON.stringify(e));
}
});
Produces error:-
10-25 23:47:33.283 29748 29833 E TiHTTPClient: (TiHttpClient-3) [85523,88494] HTTP Error (java.io.IOException): 400 : Bad Request
10-25 23:47:33.283 29748 29833 E TiHTTPClient: java.io.IOException: 400 : Bad Request
10-25 23:47:33.283 29748 29833 E TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1213)
10-25 23:47:33.283 29748 29833 E TiHTTPClient: at java.lang.Thread.run(Thread.java:818)
10-25 23:47:33.285 29748 29761 I TiAPI : {"success":false,"error":true,"code":400,"message":"Invalid name"}
10-25 23:47:33.285 29748 29761 I ALERT : (KrollRuntimeThread) [3,88497] {"success":false,"error":true,"code":400,"message":"Invalid name"}
Ticket created based on information from: https://community.appcelerator.com/topic/3825/cloud-files-create-error-invalid-name/
Place file in
resources/mytestfile.txt
Code to reproduce error:-Master PR: https://github.com/appcelerator/titanium_mobile/pull/7350 5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7351 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7352
Verified the fix. We do not see any error & it returns a success. Checked with the code in the PR. Closing. Environment: Appc Studio : 4.4.0.201510231805 Ti SDK : 5.1.0.v20151028061258, 5.0.3.v20151028061300, 5.2.0.v20151028081229 Ti CLI : 5.0.5 Alloy : 1.7.18 MAC Yosemite : 10.10.5 Appc NPM : 4.2.1-6 Appc CLI : 5.1.0-38 Node: v0.10.37 Nexus 6 : Android 6.0