-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$50] Uploaded photo is not displayed #30
Comments
This is working locally when uploading the photos to my local rest-api server. I did notice that the API is handling uploads by storing them in local storage under the server's /public/upload/ so that is something that will need to be addressed when they figure out the architecture for where to store images. |
I confirmed that on the frontend.app.cloud.gov, the issue is actually broken links to the stores URLs. For example: |
I think that there should be separate config for development and production to allow development uploads to be stored locally on the rest-api server while production config points to a cloud file storage provider. |
Looks properly configured in the rest-api https://github.com/topcoderinc/va-online-memorial-rest-api/blob/master/app.js#L39 so not sure why. If someone could inspect the server and see if that file is in public/upload |
@ramillim @dustinWeaver Hope this is what you are looking for; |
Oh, I'm sorry @sdgun I should've clarified that I needed to see the directory for API server. The one at https://rest-api.app.cloud.gov/api |
Hope this is the one; @ramillim |
@sdgun Yes, that looks correct. Can you ls public/upload? |
@ramillim > After ssh to the server I am in You mean |
@sdgun Correct, /app/public/upload/ |
@ramillim Please check above two screenshots > #30 (comment) |
@sdgun The file named 7ff363a98b99d59c5e1817b33cdacd72 doesn't exist so I wonder if it's a mismatch between what's stored in the database and what's on the server. That could happen if a new server was provisioned (since all files are stored locally), but using the existing database. I pulled down one of the more recent uploads and it looks like something you uploaded: Is the image displaying for the post you created with that image upload? If so, the issue is just that the old files that the database has references to don't exist anymore. |
@ramillim Yes |
@sdgun Great, that solves the mystery of this bug. The fix will be to:
|
Thanks so much for your help @sdgun |
@dustinWeaver @dustinTopcoder I really don't think I will be able to get this done before the challenge deadline, but can we make the assumption that the file storage will be Amazon S3? I discovered that the frontend client is hosted on AWS. |
How much of an extension would you need? But yes, I think S3 is a good assumption for now. |
@dustinTopcoder Probably until noon eastern tomorrow since I have to work on another project for the next few hours. I wrapped work on the other 2 issues today. I know there's one other person working on challenge 6 so maybe he will have it all submitted today :) |
Let's see what gets submitted and go from there. cc: @ksmacleod99 |
topcoderinc/va-online-memorial-rest-api#5 Work in progress, but I wanted to get something out as promised by noon today, but have to timebox it since I need to head out for the rest of the day. Spent too much time trying to figure out how to get this middleware that the app was using to handle multipart forms to work with S3 (https://www.npmjs.com/package/multer). The good news is S3 uploads and file deletion from are working for Photos, and I need to extend for the 2 other models that also have file uploads (NOK Requests and Veteran avatars). |
I guess technically that PR would fix Issue #30 since the bug report is only about the Photos, but I think we might as well fix it across the board and I don't think there are other issues open for the NOK requests and avatars. |
Contest https://www.topcoder.com/challenges/30069643 has been created for this ticket. |
Contest https://www.topcoder.com/challenges/30069643 has been updated - the new changes has been updated for this ticket. |
Contest https://www.topcoder.com/challenges/30069643 has been updated - the new changes has been updated for this ticket. |
Contest https://www.topcoder.com/challenges/30069643 has been updated - the new changes has been updated for this ticket. |
Target URL
https://frontend.app.cloud.gov/dashboard/10
Steps to Reproduce
Actual Result(s)
Expected Result(s)
Frequency
Environment Details
Image(s)/Video(s)/Console Log/Crash Log
The text was updated successfully, but these errors were encountered: