mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
Add screenshots to UI. Still need to implement resizing.
This commit is contained in:
@@ -43,15 +43,18 @@ module.exports = function(options) {
|
||||
, resources: (function() {
|
||||
var mapped = Object.create(null)
|
||||
storedFiles.forEach(function(file) {
|
||||
mapped[file.field] = util.format(
|
||||
'http://%s:%s/api/v1/resources/%s%s'
|
||||
, options.publicIp
|
||||
, options.port
|
||||
, file.id
|
||||
, file.name
|
||||
? util.format('/%s', path.basename(file.name))
|
||||
: ''
|
||||
)
|
||||
mapped[file.field] = {
|
||||
date: new Date()
|
||||
, url: util.format(
|
||||
'http://%s:%s/api/v1/resources/%s%s'
|
||||
, options.publicIp
|
||||
, options.port
|
||||
, file.id
|
||||
, file.name
|
||||
? util.format('/%s', path.basename(file.name))
|
||||
: ''
|
||||
)
|
||||
}
|
||||
})
|
||||
return mapped
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user