Files

21 lines
678 B
JavaScript

/**
* Mini program API wrapper for this module.
* Call guide: require this module in a page, then invoke the matching method from page event handlers or lifecycle hooks.
*/
const request = require('../utils/request')
module.exports = {
/**
* Purpose: getSignedUrl supports file.js by holding or executing the get signed url page or API role.
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
*/
getSignedUrl(fileId, expiryTimeInMinutes) {
return request({
url: `/file/get-signed-url/${fileId}`,
params: {
expiryTimeInMinutes
}
})
}
}