makeabilitylab / makeabilitylabwebsite

The Makeability Lab website
https://makeabilitylab.cs.washington.edu
MIT License
8 stars 66 forks source link

Star Wars Image upload not working on Django 2.0 #452

Closed johnsonkuang closed 6 years ago

johnsonkuang commented 6 years ago

The easter egg code that randomly selects an easter egg image for each person saved has broken in Django 2.0 due to a suspicious file operation conducted when the code looks in the imports directory for a random image. As such, I believe we have to move the images to the media directory; however, there we encounter another problem related to attempting to navigate to the correct directory. As two copies of files exist (in docker and locally), the method of retreiving a random image would need to be revised, either by:

  1. copying the images into the media directory in the docker container
  2. adjusting the local path to return the absolute path of the image stored locally
jonfroehlich commented 6 years ago

Can you update this Issue with more details. Please include the current path where the SW figures are being stored, the exact error that you are receiving (with links to online discussions about it, if possible), your exact proposed path change.

johnsonkuang commented 6 years ago

I don’t have a screen cap of the exact error I’m receiving, however the original path was to navigate to the base directory and then append ‘/import/images/StarWarsFiguresFullSquare/Rebels/’ to it. I would suggest a similar approach; however, we cannot navigate to the base directory in the same way because the code is running from docker and the images are stored locally.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Jon Froehlich notifications@github.com Sent: Tuesday, July 17, 2018 10:08:12 AM To: jonfroehlich/makeabilitylabwebsite Cc: johnsonkuang; Author Subject: Re: [jonfroehlich/makeabilitylabwebsite] Star Wars Image upload not working on Django 2.0 (#452)

Can you update this Issue with more details. Please include the current path where the SW figures are being stored, the exact error that you are receiving (with links to online discussions about it, if possible), your exact proposed path change.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jonfroehlich/makeabilitylabwebsite/issues/452#issuecomment-405656349, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfdHHAbPDxZe3pNC6pZaIq0dV-tZAqCqks5uHhn8gaJpZM4VTNzI.

johnsonkuang commented 6 years ago

could we somehow keep the images online and then random select from there?

jonfroehlich commented 6 years ago

The solution is to just have them in the media dir imo, as we discussed.