Skip to content

Commit

Permalink
Merge pull request #93 from cse442-fall-2019-offering/feature/redirec…
Browse files Browse the repository at this point in the history
…t-on-upload

(#69) Completed redirecting to homepage upon successful image upload
  • Loading branch information
supratikn authored Dec 3, 2019
2 parents 58313ec + 8a20aec commit a443f6d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Frontend/src/firebase/ImageUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ export default class ImageUploader {
upload_time_epoch: Date.now()
})
}
);
alert(
"Image successfully uploaded, please return to the homepage to view it!"
);
).then(() => {
let elem = document.createElement("a");
elem.href =
"https://www-student.cse.buffalo.edu/CSE442-542/2019-Fall/cse-442i/";
elem.click();
});
} catch (error) {
console.log("Unable to upload file: " + this.fileName + "\n" + error);
alert("Uploading image failed!");
Expand Down

0 comments on commit a443f6d

Please sign in to comment.