media/filescollection/{key}/items/file/properties?filename (PUT)

To set properties for a file. This can only be done in very specific scenarios:

  • Add comments to a file.

  • Set a deadline to a file. Used with order forms when different files require different deadlines.

  • Add page count. Used with order forms where some files may require the user to set page counts (such as with PDF files).

  • Select a document format filter. Used with order forms and if the file properties contain a list of available file format configurations to choose from.

Generally, you will not need to use this method unless you implement very advanced features.

URL

(PUT) /api/media/filescollection/{key}/items/file/properties?filename={filename}

PARAMETERS

The URL parameters are:

key

The unique files collection ID

string, Mandatory

filename

The filename including the file extension such as “myfile.docx” or “webpage.html”.

If the collection does not contains the file the method will return an HTTP error.

string, Mandatory

The BODY is a JSON object with these properties:

filename

Specify the same filename as above.

string, Mandatory

parserId

Optional. To assign the document format profile to use for this file. You can only assign profiles that are proposed in the file object, property parsers.

int?, Optional

pageCount

Optional. To assign a page count to the file. See also media/filescollection/{key} to check if page counts can be assigned and for which file types.

int?, Optional

comments

Optional. To assign a comment to a file. Set an empty string ““ to remove an existing comment.

string?, Optional

 

RESULTS

The result is a JSON object with the updated file properties. See File object for details.

Example:

{ "name": "marketing.docx", "ext": ".docx", "translate": false, "parserId": 2341, "domain": "MSWORD", "parsers": [2341, 1000], "pageCount": 3, "sizeKB": 100, "comments": "Not really" }

 

 

Copyright Wordbee - Buzzin' Outside the Box since 2008