It seems that the api will store the image url and return the same face id even the actual image in the url changed. Is there any ways to force the api to redo the identification process and return a new face id?
Asked
Active
Viewed 187 times
0
-
Would you have a sample to show up? faceId is a unique field. – EagleDev Mar 31 '18 at 16:53
-
I am hosting my image using firebase storage. I will use the same file name when I replace the old image file with the new one. The url I got from firebase is like this: https://firebasestorage.googleapis.com/v0/b/xxx/photo.jpg?alt=media&token=[token]. I observed the former part will remain the same even when a new photo is uploaded. The only changed is the [token] part. Now when I pass the url to the face detect api, it seems overlook the token part as parameter and only process the former part, that result in same returned faceId – William Wu Apr 01 '18 at 11:22
1 Answers
0
It turns out that the url parser (express.js deploy as firebase functions) will break the original url (https://xxx/xxx?alt=media&token=xxx) into two parts. In req.query there will be 2 keys: url (which ends at alt=media) and token, so I have to manually combine it back as req.query.url + '&token=' + req.query.token

William Wu
- 473
- 5
- 16