@@ -139,20 +139,18 @@ def analyze(self,
139139 params = {'version' : self .version }
140140
141141 form_data = []
142- for item in collection_ids :
143- form_data .append (
144- ('collection_ids' , (None , item , 'application/json' )))
145- for item in features :
146- form_data .append (('features' , (None , item , 'application/json' )))
142+ collection_ids = self ._convert_list (collection_ids )
143+ form_data .append (('collection_ids' , (None , collection_ids , 'text/plain' )))
144+ features = self ._convert_list (features )
145+ form_data .append (('features' , (None , features , 'text/plain' )))
147146 if images_file :
148147 for item in images_file :
149148 form_data .append (('images_file' , (item .filename , item .data ,
150149 item .content_type or
151150 'application/octet-stream' )))
152151 if image_url :
153152 for item in image_url :
154- form_data .append (
155- ('image_url' , (None , item , 'application/json' )))
153+ form_data .append (('image_url' , (None , item , 'text/plain' )))
156154 if threshold :
157155 threshold = str (threshold )
158156 form_data .append (('threshold' , (None , threshold , 'text/plain' )))
0 commit comments