Skip to content

Commit

Permalink
Merge pull request #44 from elasticio/update-readme-lookup-object
Browse files Browse the repository at this point in the history
update README.md
  • Loading branch information
Olha Virolainen authored Dec 5, 2019
2 parents e6aaf69 + 76986ba commit 799b3e4
Showing 1 changed file with 59 additions and 19 deletions.
78 changes: 59 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,32 +179,36 @@ After the upload, the READ-URL of the file will be used to generate a message wi

```json
{
"id": "b94d787a-eaab-4cf9-b80c-dcf6aa6d7db1",
"body": {
"results": [
{
"attachment": "CustomFileName.csv",
"uploadedOn": "2019-12-04T11:20:03.713Z",
"path": "/www/some_dir/1.txt"
}
]
},
"id": "0c196dca-4187-4b49-bf90-5cfe9030955b",
"attachments": {
"1.txt": {
"size": 6,
"url": "http://steward-service.platform.svc.cluster:8200/files/b94d787a-eaab-4cf9-b80c-dcf6aa6d7db1"
"url": "http://steward-service.platform.svc.cluster.local:8200/files/99999-6613-410a-9da8-c5f6d529b683",
"size": 7
}
},
"headers": {},
"metadata": {}
"body": {
"type": "-",
"name": "1.txt",
"size": 7,
"modifyTime": "2019-12-02T13:05:42.000Z",
"accessTime": "2019-12-04T14:14:54.000Z",
"rights": {
"user": "rw",
"group": "r",
"other": "r"
},
"owner": 1002,
"group": 1002,
"attachment_url": "http://steward-service.platform.svc.cluster.local:8200/files/99999-6613-410a-9da8-c5f6d529b683",
"directory": "/www/olhav",
"path": "/www/olhav/1.txt"
}
}
```

The next component may read from `url` in `attachments` for a memory-efficient way to read/parse data.

#### List of Expected Config fields
##### Directory
The directory of the files to lookup and read from.
##### Allow Empty Result
Default `No`. In case `No` is selected - an error will be thrown when no objects were found,
If `Yes` is selected - an empty object will be returned instead of throwing an error.
Expand All @@ -217,20 +221,30 @@ Default `No`. In case `No` is selected - an error will be thrown when object id
{
"type": "object",
"properties": {
"filename": {
"title": "File Name",
"path": {
"title": "Path and File Name",
"type": "string"
}
}
}
```

#### Expected output metadata

<details>
<summary>Output metadata</summary>

```json

{
"type": "object",
"properties": {
"filename": {
"type": {
"title": "Type",
"type": "string",
"required": true
},
"name": {
"title": "File Name",
"type": "string",
"required": true
Expand All @@ -239,11 +253,37 @@ Default `No`. In case `No` is selected - an error will be thrown when object id
"title": "File Size",
"type": "number",
"required": true
},
"modifyTime": {
"title": "modifyTime",
"type": "string",
"required": true
},
"accessTime": {
"title": "accessTime",
"type": "string",
"required": true
},
"directory": {
"title": "directory",
"type": "string",
"required": true
},
"path": {
"title": "path",
"type": "string",
"required": true
},
"attachment_url": {
"title": "File Size",
"type": "number",
"required": true
}
}
}

```
</details>

## Known limitations

Expand Down

0 comments on commit 799b3e4

Please sign in to comment.