Skip to content

Commit

Permalink
Update DLP Redact data code sample region to include mimetype import
Browse files Browse the repository at this point in the history
In response to feedback where a user was confused that the mimetype
import was missing from the code sample in the documentation.
  • Loading branch information
djmailhot committed Dec 12, 2018
1 parent 9677117 commit ba7a982
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dlp/redact.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
from __future__ import print_function

import argparse
# [START dlp_redact_image]
import mimetypes
# [END dlp_redact_image]
import os


# [START dlp_redact_image]

def redact_image(project, filename, output_filename,
info_types, min_likelihood=None, mime_type=None):
"""Uses the Data Loss Prevention API to redact protected data in an image.
Expand Down

0 comments on commit ba7a982

Please sign in to comment.