I got an error when I tried to upload to storage. I need to know how to deal with it.
“Uploading a file from Cloud Storage”: /slides/storage/file/{path}
-
Uploading from local to storage
-
The “–binary” option in “cURL Example” was changed to “–data-binary” because the following error occurred.
curl: option --binary: is unknown -
The version of curl is as follows.
curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL
curl -v -X POST "https://api.aspose.cloud/v3.0/slides/storage/file/presentation_images_1.pptx" "Content-Type:application/octet-stream" -H "Authorization: Bearer [TOKEN]" --ssl-no-revoke --data-binary @C:/Temp/pptsample.pptx
< HTTP/1.1 405 Method Not Allowed
< Date: Tue, 12 May 2020 07:14:10 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Server: Kestrel
< Allow: GET
< Allow: PUT
< Allow: DELETE
< Strict-Transport-Security: max-age=2592000
* HTTP error before end of send, stop sending
<
{"error":{"code":"UnsupportedApiVersion","message":"The HTTP resource that matches the request URI 'https://api.aspose.cloud/v3.0/slides/storage/file/presentation_images_1.pptx' with API version '3.0' does not support HTTP method 'POST'.","description":"Operation Failed. ","innerError":{"requestId":null,"date":"2020-05-12T07:14:10.0088652Z"}}}* Closing connection 0
* schannel: shutting down SSL/TLS connection with api.aspose.cloud port 443
* schannel: failed to send close msg: Socket not ready for send/recv (bytes written: 0)
* schannel: clear security context handle
Note: Unnecessary use of -X or --request, POST is already inferred.
* Port number ended with 'a'
* Closing connection -1
curl: (3) Port number ended with 'a'