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

Show size of files in Download section #331

Open
samsonbek opened this issue Nov 23, 2017 · 2 comments
Open

Show size of files in Download section #331

samsonbek opened this issue Nov 23, 2017 · 2 comments
Assignees

Comments

@samsonbek
Copy link
Member

In "Getting started" page, where there is list of files to download, we need to show file sizes too.
Size info could be obtained from same link, as download link, just replace get to info:
download link -> https://cdn.subut.ai:8338/kurjun/rest/raw/get?name=subutai-p2p.deb
info link -> https://cdn.subut.ai:8338/kurjun/rest/raw/info?name=subutai-p2p.deb

Response of info looks like this:

[{"id":"dbb5f882-318a-414b-b534-e3837d8b888e","hash":{"md5":"83334a3c2c50db9aa3d4ff29a204560b","sha256":"4cbeda3eea1af98154234ec5c11c3cbbcc615e45be4289141cf0d7f4a2717b7b"},"size":2502182,"name":"subutai-p2p.deb","owner":["mike"],"filename":"subutai-p2p.deb"}]

take size value from this reponse, convert to KB or MB.

Use AJAX to obtain data.

@samsonbek
Copy link
Member Author

blocked by subutai-io/cdn#155

@efeefe
Copy link
Member

efeefe commented Dec 21, 2017

If subutai-io/cdn#155 is closed, can this issue move on? @samsonbek

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

No branches or pull requests

3 participants