Skip to content

Commit 1482166

Browse files
committed
Update DLP redact image code sample region to include mimetype import
In response to feedback where a user was confused that the mimetype import was missing from the code sample in the documentation.
1 parent 9677117 commit 1482166

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dlp/redact.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
from __future__ import print_function
1919

2020
import argparse
21+
# [START dlp_redact_image]
2122
import mimetypes
23+
# [END dlp_redact_image]
2224
import os
2325

2426

2527
# [START dlp_redact_image]
28+
2629
def redact_image(project, filename, output_filename,
2730
info_types, min_likelihood=None, mime_type=None):
2831
"""Uses the Data Loss Prevention API to redact protected data in an image.

0 commit comments

Comments
 (0)