如何解决“错误":请为“选择"输入有效的格式.创建Jawbone UP应用程序时?

如何解决“错误

问题描述:

尝试在 Jawbone开发人员门户中创建应用程序时,收到以下错误消息:

When trying to create my application in the Jawbone developer portal, I get the following error message:

我搜索了错误消息,并发现了此博客文章,表示问题是我的徽标太大.但是,我的图像低于4k,上传本身似乎成功了.仅在尝试保存应用程序后才会显示失败.

I googled the error message and found this blog post, which says the issue is that my logo is too large. However, my image is under 4k, and the upload itself seems to succeed. The failure only appears after trying to save the application.

深入研究此问题的开发者门户代码(我收到有关此问题的电子邮件后,在此重新发布了此问题),看来检查是针对文件名而不是文件大小.

Dug into the developer portal code on this one (I am re-posting this question here after receiving an email about it), and it appears that the check is against the file name and not the file size.

当前上传的文件名必须与此正则表达式匹配:

Currently uploaded filenames must match this regular expression:

/^(?:[\w]\:|\\)(\\[A-Za-z_\-\s0-9\.]+)+\.(png|jpg|jpeg)$/

因此,任何包含非字母数字字符的文件名都将失败.

So, any filenames with non-alphanumeric characters will fail.

绝对需要改进该错误消息,并会检查此检查是否需要存在.

Definitely need to improve that error message and will review whether this check needs to exist.