Socket
Socket
Sign inDemoInstall

mega-mock

Package Overview
Dependencies
14
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

5

commands/handleUpload.js

@@ -12,5 +12,6 @@ const path = require('path')

const targetPath = path.resolve(options.dataFolder, 'temp_' + uploadId)
const sizeNum = Number(size)
const chunkSize = Number(req.headers['content-length'])
if (!chunkSize) throw Error('content-length required')
if (!chunkSize && sizeNum) throw Error('content-length required')

@@ -52,3 +53,3 @@ if (!fs.existsSync(targetPath)) fs.writeFileSync(targetPath, Buffer.alloc(0))

const gotEnd = uploadState.length === 1 && uploadState[0][0] === 0 && uploadState[0][1] === Number(size)
const gotEnd = uploadState.length === 1 && uploadState[0][0] === 0 && uploadState[0][1] === sizeNum
if (gotEnd) {

@@ -55,0 +56,0 @@ uploadStates.delete(uploadId)

2

package.json
{
"name": "mega-mock",
"version": "0.4.0",
"version": "0.4.1",
"description": "mega-mock mocks MEGA API servers",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc