EmDoesCs Posted October 4, 2022 Report Posted October 4, 2022 (edited) Hello when attempting to upload an avatar using uploadAvatar() I'm getting an error of image.match is not a function Here is my code var av = "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg" function uploadAvatar() { community.uploadAvatar(av, function (err) { if (err) { console.log(err) } else { console.log(url) } } ) } Here is the full error C:\Users\X\Documents\dev\X\node_modules\steamcommunity\components\profile.js:273 } else if(image.match(/^https?:\/\//)) { ^ TypeError: image.match is not a function at SteamCommunity.uploadAvatar (C:\Users\X\Documents\dev\X\node_modules\steamcommunity\components\profile.js:273:18) Thank you for any help Edited October 4, 2022 by EmDoesCs Quote
Dr. McKay Posted October 4, 2022 Report Posted October 4, 2022 You're probably overwriting av somewhere, it seems like it's not a string. Quote
EmDoesCs Posted October 4, 2022 Author Report Posted October 4, 2022 9 hours ago, Dr. McKay said: You're probably overwriting av somewhere, it seems like it's not a string. Hmm. I tried doing the string directly in the function, I also tried importing my own image locally. All of which resorted in that error. Quote
Dr. McKay Posted October 4, 2022 Report Posted October 4, 2022 What version of node and steamcommunity are you running? Quote
soider Posted February 25, 2023 Report Posted February 25, 2023 Getting same problem. node version: v19.6.1 steamcommunity version: v3.44.3 Quote
Dr. McKay Posted February 28, 2023 Report Posted February 28, 2023 Just do community.uploadAvatar("https://...") Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.