Open 1000miles opened 7 years ago
This is related to #424 potentially!
Based on last modified times it seems like the public/*.zip
files are unlikely to be used currently.
@lennerd what do you think?
As said the URI in the asset API endpoint is the URI used by the apps. Therefore it should be safe to remove the other option.
@Hoverbear discuss with @1000miles on where to purge this (new or old env?)
So according to the source code of the Android app code here it fetches the zip files listed by the API call from https://wheelmap.org/api/assets?api_key=$YOURKEY
This result looks like this:
{
"conditions":{
"page":1,
"per_page":15,
"format":"json",
"locale":null
},
"meta":{
"page":1,
"num_pages":1,
"item_count_total":2,
"item_count":2
},
"assets":[
{
"id":1,
"name":"marker",
"modified_at":1484564705,
"license":"cc-by-sa",
"url":"https://asset3.wheelmap.org/marker.zip"
},
{
"id":2,
"name":"icons",
"modified_at":1484564705,
"license":"cc-by-sa",
"url":"https://asset0.wheelmap.org/icons.zip"
}
]
}
According to the iPhone app source code here I think it does the same.
So i did some research based on that data. Here are the md5 hashes of the various files.
$ curl https://asset0.wheelmap.org/icons.zip -O && md5 icons.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 216k 100 216k 0 0 224k 0 --:--:-- --:--:-- --:--:-- 223k
MD5 (icons.zip) = 865a5c2765ecde30d7125b4449081fa8
$ md5 ~/git/sozialhelden/wheelmap/public/icons.zip
MD5 (/Users/hoverbear/git/sozialhelden/wheelmap/public/icons.zip) = 865a5c2765ecde30d7125b4449081fa8
$ md5 ~/git/sozialhelden/wheelmap/app/assets/images/icons.zip
MD5 (/Users/hoverbear/git/sozialhelden/wheelmap/app/assets/images/icons.zip) = d51413e1c754cc40e88f8a6afc268d05
I note that https://asset0.wheelmap.org/images/icons.zip
returns a 500 error.
So according to this the files downloaded by the applications is the same as the file in wheelmap/public/icons.zip
.
At the moment when we generate a zip file (icons & marker) via
bundle exec rake assets:create_zip
it seems we have 2 different paths where these files are put which is confusing.app folder:
app/assets/images/icons.zip
=> https://github.com/sozialhelden/wheelmap/blob/master/app/assets/images/icons.zipapp/assets/images/marker.zip
=> https://github.com/sozialhelden/wheelmap/blob/master/app/assets/images/marker.zippublic folder:
public/icons.zip
=> https://github.com/sozialhelden/wheelmap/blob/master/public/icons.zippublic/marker.zip
=> https://github.com/sozialhelden/wheelmap/blob/master/public/marker.zipThis is the code snippet we found for the rake task:
@TODO: