Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DLP redact image code sample region to include mimetype import #1928

Merged
merged 2 commits into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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