您好,我正在尝试介绍Inventor的设计自动化,但是我坚持使用上传参数。
这是文章:
https://forge.autodesk.com/blog/simple-introduction-design-automation-inventor
我最近的卷曲请求:
curl -X POST \
https://dasprod-store.s3.amazonaws.com \
-H 'content-type: application/octet-stream' \
-F key=apps/Hf3jB7SzAGmZnHhBdRFvVHJEaCa7xPzN/ThumbnailBundle/1 \
-F policy=eyJleHBpcmF0aW9uIjoiMjAxOS0wMi0xMlQxNzowNDozMi43NTIxNDc0WiIsImNvbmRpdGlvbnMiOlt7ImtleSI6ImFwcHMvSGYzakI3U3pBR21abkhoQmRSRnZWSEpFYUNhN3hQek4vVGh1bWJuYWlsQnVuZGxlLzEifSx7ImJ1Y2tldCI6ImRhc3Byb2Qtc3RvcmUifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMCJ9LFsic3RhcnRzLXdpdGgiLCIkc3VjY2Vzc19hY3Rpb25fcmVkaXJlY3QiLCIiXSxbInN0YXJ0cy13aXRoIiwiJGNvbnRlbnQtVHlwZSIsImFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSJdLHsieC1hbXotc2VydmVyLXNpZGUtZW5jcnlwdGlvbiI6IkFFUzI1NiJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCIwIiwiMTA0ODU3NjAwIl0seyJ4LWFtei1jcmVkZW50aWFsIjoiQVNJQVRHVkpaS00zQUtFWk9ER0gvMjAxOTAyMTIvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdC8ifSx7IngtYW16LWFsZ29yaXRobSI6IkFXUzQtSE1BQy1TSEEyNTYifSx7IngtYW16LWRhdGUiOiIyMDE5MDIxMlQxNjA0MzJaIn0seyJ4LWFtei1zZWN1cml0eS10b2tlbiI6IkZRb0daWEl2WVhkekVHa2FERS9kN1ZqY09aQWU2UXBrdVNMdkFWeUxPUkJaditZSHhGUGZUZi85THVBMnQ4NlZYYlhYeGhDV2QxZTgzbGNVSnhmSGQ4bjNkRmlzc291dGpIWG5pcGxwcW5rR2l2bXdFK0w1NkJMQ1JCcDRzYnBXVkVVNVFZcEQ0MkE1VC81Nlgvc2Z5UU5WRzFwMlY5VDBpMTZqWS9ybVpWZ2FLeXU2a0Job2duRGlia0dxb2EvK3FDYmZGcklTVEVJNGdYOWtNTC8wS2xZTFZ0endsbTN0MFpMZlV6Wit1cHlBMGhBaEh3aVlkcHk0TWFkTEU0N245Qi91VHpPMUo0cVdiY1dLaXMrbkMvTy96SlhuTnVhZ2JnV3FoK1NuZjJRM2hyaGlWQTQySVVxZG0xZmtoMVhsdHRCOEZrMDU3dnlUaVFsT1FjY21zczh4cEUrbUNHR0FEMFRYS0tuVmkrTUYifV19 \
-F content-type=application/octet-stream \
-F success_action_status=200 \
-F success_action_redirect= \
-F x-amz-signature=2583b27e19fdb5ff23950d6866dc3765c1f1bcd9c9b43d2fb2cbeb252e9e6507 \
-F x-amz-credential=ASIATGVJZKM3AKEZODGH/20190212/us-east-1/s3/aws4_request/ \
-F x-amz-algorithm=AWS4-HMAC-SHA256 \
-F x-amz-date=20190212T160432Z \
-F x-amz-server-side-encryption=AES256 \
-F x-amz-security-token=FQoGZXIvYXdzEGkaDE/d7VjcOZAe6QpkuSLvAVyLORBZv+YHxFPfTf/9LuA2t86VXbXXxhCWd1e83lcUJxfHd8n3dFissoutjHXniplpqnkGivmwE+L56BLCRBp4sbpWVEU5QYpD42A5T/56X/sfyQNVG1p2V9T0i16jY/rmZVgaKyu6kBhognDibkGqoa/+qCbfFrISTEI4gX9kML/0KlYLVtzwlm3t0ZLfUzZ+upyA0hAhHwiYdpy4MadLE47n9B/uTzO1J4qWbcWKis+nC/O/zJXnNuagbgWqh+Snf2Q3hrhiVA42IUqdm1fkh1XlttB8Fk057vyTiQlOQccmss8xpE+mCGGAD0TXKKnVi+MF \
-F file=@/C:\Users\sejjilali\Desktop\InventorForgeAddInServer.zip
答案 0 :(得分:1)
在邮递员的请求中,看起来x-amz-algorithm表单数据值的末尾有一个空格。尝试在“ AWS4-HMAC-SHA256”之后将其删除。
答案 1 :(得分:1)
您正在使用Policy指定授权令牌,在您的邮递员和cURL命令“ -H'Authorization:Bearer [token]”中,令牌都必须是Header。
答案 2 :(得分:0)
使用-H'Content-Type:application / x-www-form-urlencoded'代替八位字节流。