File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1414 * permissions and limitations under the License.
1515 */
1616import { recognition_endpoints } from '../endpoints/recognition_endpoints.js' ;
17+ import { common_endpoints } from '../endpoints/common_endpoints.js' ;
1718import { common_functions } from '../functions/index.js' ;
1819
1920class RecognitionService {
@@ -59,6 +60,14 @@ class RecognitionService {
5960 . catch ( error => {
6061 reject ( error )
6162 } )
63+ } else if ( image_path instanceof Blob ) {
64+ common_endpoints . upload_blob ( image_path , url , this . key )
65+ . then ( response => {
66+ resolve ( response . data )
67+ } )
68+ . catch ( error => {
69+ reject ( error )
70+ } )
6271 } else {
6372 recognition_endpoints . face_request ( image_path , url , this . key )
6473 . then ( response => {
@@ -126,6 +135,14 @@ class RecognitionService {
126135 . catch ( error => {
127136 reject ( error )
128137 } )
138+ } else if ( image_path instanceof Blob ) {
139+ common_endpoints . upload_blob ( image_path , url , this . key )
140+ . then ( response => {
141+ resolve ( response . data )
142+ } )
143+ . catch ( error => {
144+ reject ( error )
145+ } )
129146 } else {
130147 recognition_endpoints . face_request ( image_path , url , key )
131148 . then ( response => {
@@ -170,6 +187,14 @@ class RecognitionService {
170187 . catch ( error => {
171188 reject ( error )
172189 } )
190+ } else if ( image_path instanceof Blob ) {
191+ common_endpoints . upload_blob ( image_path , url , this . key )
192+ . then ( response => {
193+ resolve ( response . data )
194+ } )
195+ . catch ( error => {
196+ reject ( error )
197+ } )
173198 } else {
174199 recognition_endpoints . face_request ( image_path , url , key )
175200 . then ( response => {
You can’t perform that action at this time.
0 commit comments