Horndev / zapread.com

Website for zapread.com
https://www.zapread.com
GNU Affero General Public License v3.0
18 stars 4 forks source link

Manage Profile, Update Profile Image not working #468

Closed sgornick closed 4 years ago

sgornick commented 4 years ago

After updating my profile image, the avatar and profile image are not updated

Steps to reproduce the behavior:

  1. Go to User Profile manager
  2. Click on Update Profile Image (tool icon)
  3. Upload profile image (see attached test-profile-image-600x573.png).
  4. Message will be displayed "Your profile image has been updated!" Click OK.
  5. Log off, clear browser cache / cookies / history, and restart browser.
  6. Go to User Profile manager
  7. "Robot" (default) profile image will show.

Expected behavior I expected to see the profile image that was updated.

  1. From User Profile manager, right click on profile image (upper left panel), click Open image in New Tab
  2. For me, that URL is: https://www.zapread.com/Home/UserImage/?size=500&v=11
  3. Change URL so size= is some over value, ... e.g., 501 https://www.zapread.com/Home/UserImage/?size=501&v=11
  4. The correct profile image that I had uploaded will appear.

Possible Cause This tells me the image did correctly upload, but whatever serves the image is pulling from a cache. Changing the URL to a different size forces the server to pull the image from the source and thus that is why that is served correctly, but any request using a size= that was cached will still serve the wrong (old) image.

Attachment (test-profile-image-600x573.png image) follows:

test-profile-image-600x573

Horndev commented 4 years ago

Looks like I need to add some cache busting.

Horndev commented 4 years ago

Fix will roll out with 1b58a496afa681f75bb0372cc5eb3296258349f2