Skip to content
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

fixes for uploading files, status.json #29

Merged
merged 2 commits into from
May 5, 2019
Merged

fixes for uploading files, status.json #29

merged 2 commits into from
May 5, 2019

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented May 5, 2019

Fix for:


# status.json records:
# http://export.mapknitter.org/public/warps/13015/13015-geo.tif
# 
# but this route says it should be at:
# http://export.mapknitter.org/id/13015/13015-geo.tif
# http://export.mapknitter.org/id/13015/13015.jpg
#
# it actually is at:
# http://export.mapknitter.org/id/1557020467/1557020467.jpg
#
# ideally we want (but are OK with this redirect):
# https://storage.cloud.google.com/mapknitter-exports-warps/13015/13015.jpg
# 

@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

This should be almost ready to merge; i'm still not seeing the status.json file getting updated but I think it may be due to a gdal version mismatch locally; it may work on production.

@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

I've confirmed it uploads geotiffs and jpgs both correctly!

@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

It also uses fog's file.public_url as well as adds a static path to status.json -- and irons out the redirect paths too.

app.rb Outdated
@@ -31,18 +31,27 @@
send_file "public/warps/#{params[:id]}/#{params[:id]}.jpg"
end

# status.json records:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed, but I want to confirm first on production. I'll move this into a comment.

@jywarren jywarren mentioned this pull request May 5, 2019
2 tasks
@icarito
Copy link
Member

icarito commented May 5, 2019

Cool! I tried public_url but got nil from Fog... Cool because I was looking into this to close #5

@jywarren jywarren merged commit 1049346 into main May 5, 2019
@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

Yeah I'm not getting 100% here running locally, but let's give it a try? 🚀 🙌

@icarito
Copy link
Member

icarito commented May 5, 2019

Let's do this!
🚀
I'll see deploy...

@jywarren
Copy link
Member Author

jywarren commented May 5, 2019

also, it's late! Signing off for tonight -- don't stay up too late! You've been pulling some super late nights, sebastian!

@icarito
Copy link
Member

icarito commented May 5, 2019

Yes I'll stay another hour only! Thanks for the advice! I enjoy it, the cool air, and it's nice and quiet - but I'll limit to keep healthy!
🌑 🍏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants