Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1523

POST file with metadata

$
0
0

@schoel wrote:

Hi,

Your API docs seem to indicate that I can attach metadata to files that I upload to DSP. I just cannot figure out how to do that. In POST /files/{file_path} it says the schema for the body is:

{
  "name": "string",
  "path": "string",
  "content_type": "string",
  "metadata": [
    "string"
  ]
}

But where does the file content go in this case? On the other hand, I can post the file contents directly, but how do I attach metadata then?

As an example often explains things best, could you give me a plain but complete HTTP request (as opposed to a PHP/JavaScript/whatever API call) that would do the following:

  • uploads file foo.txt
  • with content type text/plain
  • and content "Foo Bar Baz"
  • as well as metadata item "bar=baz"

Thanks.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 1523

Trending Articles