steamutils 1.4.99 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -5976,10 +5976,14 @@ export default class SteamUser {
|
|
5976
5976
|
}
|
5977
5977
|
|
5978
5978
|
async uploadAvatar(filePath) {
|
5979
|
+
if (typeof filePath !== "string") {
|
5980
|
+
console.error("Invalid file path", filePath);
|
5981
|
+
return;
|
5982
|
+
}
|
5979
5983
|
let deleteFile = false;
|
5980
|
-
if (
|
5984
|
+
if (filePath.startsWith("http")) {
|
5981
5985
|
deleteFile = true;
|
5982
|
-
filePath = await downloadImage(
|
5986
|
+
filePath = await downloadImage(filePath, `TempImg_${Date.now()}.png`);
|
5983
5987
|
if (!filePath) {
|
5984
5988
|
return;
|
5985
5989
|
}
|