exadel-inc / exadel-inc/compreface-javascript-sdk
I can't add images to the face collection (`TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function`)
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I can't add faces images to the face collection.
I get the following error: `TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function`.
I tested at versions:
- compreface-javascript-sdk: `0.5.2` and `0.6.0`
- CompreFace Server: `0.6.0`
**To Reproduce**
```yarn
faceCollection.add(path_to_image, nameImgEncoded).then(response => {
console.log(`Image ${path_to_image} added!`);
}).catch(error => {
console.log(`Oops! There is problem in uploading image ${error}.`);
console.log(error);
});
```
**Expected behavior**
A clear and concise description of what you expected to happen.
**Logs**
```yarn
Oops! There is problem in uploading image TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function.
TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function
upload_path common_endpoints.js:84
add recognition_service.js:124
add recognition_service.js:114
```
**Additional context**
I checked **line 84** from `common_endpoints.js` (at function `upload_path`), and there is the following command:
https://github.com/exadel-inc/compreface-javascript-sdk/blob/52260bd5444c040f7aaf3369cb64e4b2a37605d4/endpoints/common_endpoints.js#L84
Can you help me avoid this possible bug?
Tks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.