Adding Labels (Deprecated)

To securely organize your user-uploaded videos, you can declare a static label and or a regular expression dynamic parameter.

Labels passed in these parameters are signed so HTML-injection attacks cannot change these labels. A label will be applied to every video uploaded via your widget whereas dynamic is a regular expression rule for dynamically entered labels using addDynamicLabel.

Note: The <id> portion may contain any alpha-numeric character(s) for label[<id>] and dynamic[<id>], as this string is for your convenience.

Examples:

label[<id>] (String)

To add a label identifying the customer uploading the file, use:

label[by_user]=/user/u12345 label[by_classification]=/user/classification/trusted

In this example, any uploaded videos would have the labels u12345 (a sublabel of user), and trusted (a sublabel of classification which is a sublabel of user.)

Label names used should be fully-qualified, starting with a leading forward slash, and may contain any alpha-numeric character. If a label does not already exist it will be created.

dynamic[<id>] (String)

To set specific labels which can be made available for users to add to content use:

dynamic[by_genre]=^/by_genre/(action|comedy|drama)$

In this example, the user is limited to one of three genres (action, comedy, drama), giving you consistency in labeling. In the dynamic[<id>]parameter, the use of the '^' character at the beginning of the line and the '$' character at the end of the line limits the set of values. Omitting them allows for a wider match. For example,

dynamic[custom]=^/custom/ 

would allow the user to create and add any label which name starts with /custom/ due to the lack of an end character. All dynamic values are regular expressions.

Note: If the partner sets the parameters too wide, dynamic labels may be at risk for code injection attacks.

해당 내용이 도움 되었습니까?