Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc843e2

Browse filesBrowse files
djmailhotengelke
authored andcommitted
Update DLP redact image code sample region to include mimetype import (GoogleCloudPlatform#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 b393619 commit dc843e2
Copy full SHA for dc843e2

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎dlp/redact.py

Copy file name to clipboardExpand all lines: dlp/redact.py
+3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.