Commit 910d6de6 authored by minseok.park's avatar minseok.park

update download fn

parent 5b105b71
......@@ -17,12 +17,14 @@
var pathname = window.location.pathname
var path = pathname.split('/')
var filename = path[2] ? path[2] === 'swlab-docs' ? 'docs' : `docs-${path[2]}` : ''
var directory = path[2] && path[3] ? path[2] === 'swlab-docs' ? 'docs' : path[3] : ''
var directory = path[2] && path[3] ? path[2] === 'swlab-docs' ? path[2] : path[3] : ''
var link = document.createElement('a')
link.href = `http://182.162.100.110:10001/download-file?filename=${filename}.zip&directory=${directory}`
link.click()
document.removeChild(link)
if (link.parentNode) {
document.body.removeChild(link)
}
})
})()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment