bytifi 0.2.7 → 0.2.8

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.
Files changed (2) hide show
  1. package/lib/upload.js +5 -1
  2. package/package.json +1 -1
package/lib/upload.js CHANGED
@@ -91,10 +91,14 @@ async function uploadDirect(context, encryptedBuffer, {
91
91
  }) {
92
92
  const formData = new FormData()
93
93
  const blob = new Blob([encryptedBuffer], { type: 'application/octet-stream' })
94
+ const clientEncryptionMeta = {
95
+ ...context.meta,
96
+ encryptedSize: encryptedBuffer.length,
97
+ }
94
98
 
95
99
  formData.append('file', blob, context.originalName)
96
100
  formData.append('clientEncrypted', 'true')
97
- formData.append('clientEncryptionMeta', JSON.stringify(context.meta))
101
+ formData.append('clientEncryptionMeta', JSON.stringify(clientEncryptionMeta))
98
102
  formData.append('deleteOnDownload', deleteOnDownload ? 'true' : 'false')
99
103
  formData.append('expiresInMinutes', String(expiresInMinutes))
100
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bytifi",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Official Bytifi CLI — encrypt, upload, and decrypt files from the terminal",
5
5
  "type": "module",
6
6
  "author": "Bytifi",