Skip to content

Commit aad0da2

Browse files
committed
fix(Visual Recognition V3): Fixed example to not send null _classifierID. Revised service to send a
1 parent 40a7950 commit aad0da2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Examples/ServiceExamples/Scripts/ExampleVisualRecognition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private IEnumerator Examples()
152152
Log.Debug("ExampleVisualRecognition.Examples()", "Attempting to classify via image on file system");
153153
string imagesPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/visual-recognition-classifiers/giraffe_to_classify.jpg";
154154
string[] owners = { "IBM", "me" };
155-
string[] classifierIDs = { "default", _classifierID };
155+
string[] classifierIDs = { "default" };
156156
if (!_visualRecognition.Classify(OnClassifyPost, OnFail, imagesPath, owners, classifierIDs, 0.5f))
157157
Log.Debug("ExampleVisualRecognition.Classify()", "Classify image failed!");
158158

Scripts/Services/VisualRecognition/v3/VisualRecognition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public VisualRecognition(Credentials credentials)
345345
if (imageData != null)
346346
{
347347
req.Forms = new Dictionary<string, RESTConnector.Form>();
348-
req.Forms.Add("images_file", new RESTConnector.Form(imageData, imageMimeType));
348+
req.Forms.Add("images_file", new RESTConnector.Form(imageData, "image" + Utility.GetExtension(imageMimeType), imageMimeType));
349349
}
350350

351351
return connector.Send(req);

0 commit comments

Comments
 (0)