MCPcopy Create free account
hub / github.com/appium/appium / addStorage

Function addStorage

scripts/crowdin-update-docs-resources.mjs:123–134  ·  view source on GitHub ↗

* @param {string} name Should be properly url-encoded * @param {string} fullPath * @param {string} contentType Should be one of https://www.iana.org/assignments/media-types/media-types.xhtml * @returns {Promise >}

(name, fullPath, contentType)

Source from the content-addressed store, hash-verified

121 * @returns {Promise<Record<string, any>>}
122 */
123async function addStorage(name, fullPath, contentType) {
124 const {data: storageData} = await performApiRequest('/storages', {
125 method: 'POST',
126 headers: {
127 'Crowdin-API-FileName': name,
128 'Content-Type': contentType,
129 },
130 payload: fs.createReadStream(fullPath),
131 isProjectSpecific: false,
132 });
133 return storageData;
134}
135
136/**
137 * @param {string[]} matchedFiles

Callers 2

uploadDocumentsToStorageFunction · 0.85
updateMkDocsConfigFunction · 0.85

Calls 1

performApiRequestFunction · 0.90

Tested by

no test coverage detected