Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 Direct Upload 上传成功后,提交表单报签名错误 #20

Closed
beviz opened this issue Oct 16, 2018 · 4 comments
Closed

使用 Direct Upload 上传成功后,提交表单报签名错误 #20

beviz opened this issue Oct 16, 2018 · 4 comments

Comments

@beviz
Copy link

beviz commented Oct 16, 2018

配置结构与 README 中相同,在 Direct Upload 上传成功后,使用 signed_id 提交表单,抛出 500 错误如下:

Aliyun::OSS::ServerError (The request signature we calculated does not match the signature you provided. Check your key and signing method. RequestId: XXXXXX):

而实际数据也已经保存成功。

@beviz beviz closed this as completed Oct 16, 2018
@beviz beviz reopened this Oct 17, 2018
@huacnlee
Copy link
Owner

我验证没有问题,你可以看看 test/dummy 里面的用法

https://github.com/huacnlee/activestorage-aliyun/blob/master/test/dummy/app/views/users/_form.html.erb#L26

2018-10-17 15 54 19

@beviz
Copy link
Author

beviz commented Nov 28, 2018

抱歉,一直在忙别的事情。

我本地使用最简调用依然是 signature 不能通过验证,有没有可能是自定义域名组合 sign 处理不当导致的不匹配呢?

@beviz
Copy link
Author

beviz commented Nov 28, 2018

又通过尝试不同配置发现,如果 path 设置为 /,就会出现 signature 错误了,改为其它字符,比如 ooxx 就不会报错了。

README 里 写着默认为 /,即应允许显性的配置为 / 才对,请检查一下。

@huacnlee
Copy link
Owner

huacnlee commented Nov 28, 2018

Just released 0.6.0 for fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants