Code Monkey home page Code Monkey logo

Comments (3)

cyrichardson avatar cyrichardson commented on July 21, 2024

@annegentle : Checking on this.

from docs-cloud-files.

cyrichardson avatar cyrichardson commented on July 21, 2024

@annegentle: Testing shows example does work, but I will update to say that you should put in an appropriate Content-Length and Content-Type for your object as noted in Jamie's emailed response to customer. Results below:

Create container curl example and result:
$ curl -i -X PUT https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_0672d7fa-9f85-4a81-a3ab-adb66a880321/testContainer -H "X-Auth-Token: $AUTH_TOKEN"

HTTP/1.1 201 Created
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx858f693aeb5d420ea43da-00568d3c5cdfw1
Date: Wed, 06 Jan 2016 16:10:04 GMT

Upload object curl example and result:
$ curl -i -X PUT https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_0672d7fa-9f85-4a81-a3ab-adb66a880321/testContainer/testObject -H "X-Auth-Token: $AUTH_TOKEN" -H "Content-Length: 0" -H "Content-Type: image/jpeg"

HTTP/1.1 201 Created
Last-Modified: Wed, 06 Jan 2016 16:24:01 GMT
Content-Length: 0
Etag: d41d8cd98f00b204e9800998ecf8427e
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txce5dc394eea940a08a672-00568d3fa0dfw1
Date: Wed, 06 Jan 2016 16:24:00 GMT

from docs-cloud-files.

cyrichardson avatar cyrichardson commented on July 21, 2024

Just got this comment from support about Content-Length via IRC channel:

10:26 SCO_JohnH: typically, it should be noted that by default curl will set the content-length correctly without it being specifically set so for that example, it would be okay to omit the content-length altogether

from docs-cloud-files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.