Usage:
/thumbs/p-(profile)-ver1/(filename in source bucket)
/txtimg/?querystring (check bottom)
/txtimg/encrypted (check bottom)
Environment Variables:
| config_event_log | yes/no |
| config_event_log_tablename | |
| config_event_log_key | |
| config_product_key | |
| config_cache_in_days | default 30 |
| config_read_buckets_mandatory | yes/no |
| config_read_buckets | comma separated values |
| config_write_buckets_mandatory | yes/no |
| config_write_buckets | comma separated values |
| config_error_image | url |
| config_log_target | dynamodb/firehose |
| config_log_tablename | dynamodb tablename |
| config_log_topic | firehose topic |
| config_enable_access_log | yes/no |
| config_enable_error_log | yes/no |
Sample profiles:
{
"product": "ONE",
"profiles": {
"profile1": {
"ACL": "public-read",
"d_b": "ct-cartrade-thumbs",
"error_image": "4_3",
"h": "225",
"m": "crop",
"M": "image/jpeg",
"s_b": "ct-cartrade",
"w": "300"
},
"profile2": {
"ACL": "public-read",
"d_b": "ct-cartrade-thumbs",
"error_image": "4_3",
"h": "225",
"m": "crop",
"M": "image/jpeg",
"s_b": "ct-cartrade",
"w": "300"
},
}
}
Query Params:
| Property | Value | Mandatory | Description |
| w | numeric | Yes | Width |
| h | numeric | Yes | Height |
| s_b | string | Yes | Source Bucket |
| s_k | string | Yes | Source Key |
| d_b | string | Yes | Destination Bucket |
| d_k | string | Yes | Destination Key |
| ACL | private,public,public-read | Yes | Access Control |
| M | image/jpeg, image/png | Output MIME Type | |
| m | crop, fill | Mode | |
| b_c | 255,255,255 | Background Color. RGB values. | |
| wm | 0, 1 | WaterMark | |
| wm_b | string | Yes | WaterMark Bucket |
| wm_k | string | Yes | WaterMark Key |
| wm_p | TL,TR,BL,BR,C | Yes | Position TopLeft,TopRight,BottomLeft,BottomRight,Center |
| wm_s | number | Yes | Size in % |
| wm_t | 4,8,16 | Watermark Tiles | |
| wm_o | 0.0 to 10 | Watermark Opacity | |
| t | 1 | Text Write | |
| t_t | String | Yes | Text to Write (should be urlencoded, no special chars) Use _NL_ to give line break |
| t_p | TL,BL | Yes | Position |
| t_s | number | Yes | Font Size |
| t_c | 255,255,255 | Yes | Font Color. RGB values |
| n_s | 1 | Do not save file. no destination bucket required | |
| resize | again | Force recreation of thumb, even if already generated |
{
"logname" => "", pk
"time" => date("Y-m-d H:i:s"), sk
"expire" => time() + ( 30 * 86400 ),
"event" => requestContext json array
}
/txtimg?querystring
/txtimg?encrypted_querystring
encrypted_querystring = base64url_encode ( gzcompress( json_encode( \$query ) ))
| Property | Value | Mandatory | Description |
| w | numeric | Yes | Width |
| h | numeric | Yes | Height |
| M | image/jpeg, image/png | Output MIME Type | |
| b_c | 255,255,255 | Background Color. RGB values. | |
| t_t | String | Yes | Text to Write (should be urlencoded, no special chars) Use _NL_ to give line break |
| t_s | number | Yes | Font Size |
| t_c | 255,255,255 | Yes | Font Color. RGB values |
| f | Arial ArialBold Ubuntu-Regular Ubuntu-Bold Ubuntu-Italic Ubuntu-BoldItalic Ubuntu-Light Ubuntu-LightItalic | Yes | Font |