steamutils 1.4.99 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
}
|