Skip to content

Commit f113c2e

Browse files
djmailhotengelke
authored andcommitted
Update DLP redact image code sample region to include mimetype import [(#1928)](GoogleCloudPlatform/python-docs-samples#1928)
In response to feedback where a user was confused that the mimetype import was missing from the code sample in the documentation.
1 parent 33d3152 commit f113c2e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

samples/snippets/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)