Skip to content

Commit

Permalink
Merge pull request #276 from cozy/feat/description
Browse files Browse the repository at this point in the history
docs: Add file metadata description
  • Loading branch information
JF-Cozy authored Nov 27, 2024
2 parents 23be1e8 + 34b02e4 commit fd3b013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/io.cozy.files.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ The attributes of a file are:
- `md5sum`: {string} the checksum of its content, computed with the MD5 algorithm
- `created_at`: {date} the date of the creation of this file given by the client
- `updated_at`: {date} the date of the last update of this file given by the client
- `tags`: {array of strings} a list of tags. It is currently used to know if a file was uploaded through the mobile photo sync, with the value `library`.
- `tags`: {array of strings} a list of tags. It is currently used to know if a file was uploaded through the mobile photo sync, with the value `library`.
- `size`: {number} the size of its content, in bytes
- `executable`: {bool} true is the file has the executable bit on UNIX (`chmod +x`)
- `class`: {string} a class in the list: `['image', 'document', 'audio', 'video', 'text', 'binary', 'pdf', 'files', 'code', 'slide', 'spreadsheet', 'text', 'zip', 'shortcut']`
- `mime`: {string} the full mime-type
- `metadata`: {map} an optional map of metadata ([Full metadata description](io.cozy.files_metadata.md)), with for example:
- `width`: {number}
- `height`: {number}
- `description`: {string}
- `datetime`: {date} : date in original image file metadata
- `gps`: {map} : localization metadata with the following attributes
- `lat`: {float}: latitude
Expand Down Expand Up @@ -69,7 +70,7 @@ These thumbnail links are valid for 10 minutes. After that, links will return a
When a file or a directory is put in the trash bin, some attributes are updated:
- `trashed` is set to true, but only for files: directories never have this attribute.
- The `restore_path` is set, for both files and directories.
- ⚠️ The `restore_path` is not set on children. For instance, if a directory `foo` is trashed, it will have a `restore_path` but not the children.
- ⚠️ The `restore_path` is not set on children. For instance, if a directory `foo` is trashed, it will have a `restore_path` but not the children.
- The `path` is updated only for directories, starting with `.cozy_trash`

Here is how one could query files and directories **not** in the trash, through a mango query:
Expand Down
1 change: 1 addition & 0 deletions docs/io.cozy.files_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ expected in every cases.

- `contentAuthor` : {string} the author of the document, e.g. `impots.gouv`, `amazon.com`, etc. It is currently used as a source meaning.
- `datetime` : {date} Equals to the date attribute specified by `datetimeLabel`.
- `description`: {string} A file summary
- `fileIdAttributes` : {string} Used to deduplicate files imported by a konnector. This is a concatenation of a set of attributes, separated by `####`. For example: `mycontractid####myfile.pdf####/mypath/`.
- `datetimeLabel` : {string} specify which attribute is used as `datetime`, e.g.
`issueDate` or `startDate`.
Expand Down

0 comments on commit fd3b013

Please sign in to comment.