autopass 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -317,6 +317,9 @@ class Autopass extends ReadyResource {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
async add(key, value, file) {
|
|
320
|
+
if (file && file.byteLength > 6 * 1024 * 1024) {
|
|
321
|
+
throw new Error('File length should be less than 6 MB')
|
|
322
|
+
}
|
|
320
323
|
await this.base.append(encode('@autopass/put', { key, value, file }))
|
|
321
324
|
}
|
|
322
325
|
|