简体   繁体   English

Cordova FileTransfer返回空错误代码

[英]Cordova FileTransfer Returning Null Error Code

So, after tinkering with this for a while, I have noticed that the upload() function throws at least the most rudimentary error even if the given upload destination is completely bogus. 所以,经过一段时间的修补,我注意到即使给定的上传目的地是完全虚假的,upload()函数也至少抛出最基本的错误。 However, if there's an UNDERSCORE anywhere in the domain (specifically, I need to upload to dev_upload_area.s3.amazonaws.com), like the one I have to upload to, the request doesn't even happen, the uploadFailure function is called with a null error code immediately. 但是,如果域中的任何地方有一个UNDERSCORE(具体来说,我需要上传到dev_upload_area.s3.amazonaws.com),就像我必须上传到的那个,请求甚至不会发生,上传调用函数调用立即出现空错误代码。

Any help? 有帮助吗?

EDIT: And yes, access origins are properly set. 编辑:是的,访问来源已正确设置。

I went through the same problem, and I found that RFC stipulates that the underscore is not a valid character in a domain name. 我遇到了同样的问题,我发现RFC规定下划线不是域名中的有效字符。 So either you change your url, either you have to modify FileTransfer plugin java source to escape the character. 因此,要么您更改您的网址,要么您必须修改FileTransfer插件java源以逃避该字符。

Sources: 资料来源:

Illegal character in path at index 25 索引25处路径中的非法字符

http://forum.soapui.org/viewtopic.php?t=14188 http://forum.soapui.org/viewtopic.php?t=14188

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5049974 http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5049974

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM