Skip to content

Commit

Permalink
Image upload parsing update (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiewilbraham authored Nov 20, 2020
1 parent 35b3983 commit b3142b2
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,13 @@ export class ModelViewerComponent extends Component {
.slice(0, -1)
.join(".")
.toLowerCase();
const matchedModels = models.filter(model =>
model.id.toLowerCase().split(":")
.pop() === fileNameWithoutExtension);
const matchedModels = models.filter(model => {
const formattedModelName = model.id.toLowerCase().split(":")
.join("_")
.split(";")
.join("-");
return formattedModelName === fileNameWithoutExtension;
});
if (matchedModels.length > 0) {
const id = matchedModels[0].id;
print(`*** Uploading model image for ${id}`, "info");
Expand Down

0 comments on commit b3142b2

Please sign in to comment.