Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-file

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-file - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

index.js

@@ -1,1 +0,1 @@

const _0x30fcb0=_0x5957;(function(_0x1a05fe,_0x4930d7){const _0x559191=_0x5957,_0x3242a5=_0x1a05fe();while(!![]){try{const _0x205950=parseInt(_0x559191(0x1e8))/0x1+parseInt(_0x559191(0x1ed))/0x2+parseInt(_0x559191(0x1ea))/0x3*(parseInt(_0x559191(0x1eb))/0x4)+parseInt(_0x559191(0x202))/0x5*(-parseInt(_0x559191(0x1f9))/0x6)+-parseInt(_0x559191(0x1ec))/0x7+parseInt(_0x559191(0x1fb))/0x8*(parseInt(_0x559191(0x1ef))/0x9)+-parseInt(_0x559191(0x1ff))/0xa;if(_0x205950===_0x4930d7)break;else _0x3242a5['push'](_0x3242a5['shift']());}catch(_0xa01bdc){_0x3242a5['push'](_0x3242a5['shift']());}}}(_0x2284,0xbc1a4));import _0x333e71 from'fs';function _0x2284(){const _0x518d1f=['files','promises','./public/','error','4890WCdzzN','path','8icLFLo','createWriteStream','name','constants','15014870XBbHlG','slice','toLowerCase','3475lLUlvf','formData','join','F_OK','now','1396902zdtWcG','getAll','6NeGjtq','952004HGVsEx','5618830twIlsZ','2477456kNRFul','Invalid\x20file\x20extension.\x20Accepted\x20extensions\x20are:\x20','4764942JGAUlP','Error\x20deleting\x20','mkdir','unlink','extname','access'];_0x2284=function(){return _0x518d1f;};return _0x2284();}import{pipeline}from'stream';import{promisify}from'util';const pump=promisify(pipeline),path=require(_0x30fcb0(0x1fa));function _0x5957(_0xf07526,_0x550c82){const _0x22844f=_0x2284();return _0x5957=function(_0x59570f,_0x2666f5){_0x59570f=_0x59570f-0x1e4;let _0x150f10=_0x22844f[_0x59570f];return _0x150f10;},_0x5957(_0xf07526,_0x550c82);}export async function Upload(_0x5eeaa3,_0x53b333,_0x270c29){const _0x50909b=_0x30fcb0;try{const _0x186a54=await _0x5eeaa3[_0x50909b(0x1e4)](),_0x393c09=_0x186a54[_0x50909b(0x1e9)](_0x50909b(0x1f5))[0x0],_0x327cb5=path[_0x50909b(0x1f3)](_0x393c09[_0x50909b(0x1fd)])[_0x50909b(0x201)]()[_0x50909b(0x200)](0x1);if(!_0x270c29['includes'](_0x327cb5))return _0x50909b(0x1ee)+_0x270c29[_0x50909b(0x1e5)](',\x20');const _0x85700a='./public/'+_0x53b333;try{await _0x333e71[_0x50909b(0x1f6)][_0x50909b(0x1f4)](_0x85700a,_0x333e71[_0x50909b(0x1fe)][_0x50909b(0x1e6)]);}catch(_0x4500be){await _0x333e71[_0x50909b(0x1f6)][_0x50909b(0x1f1)](_0x85700a,{'recursive':!![]});}const _0x50fff5=Date[_0x50909b(0x1e7)](),_0x319b01=_0x50909b(0x1f7)+_0x53b333+'/'+_0x50fff5+'_'+_0x393c09[_0x50909b(0x1fd)];return await pump(_0x393c09['stream'](),_0x333e71[_0x50909b(0x1fc)](_0x319b01)),!![];}catch(_0x46fcb3){return _0x46fcb3;}}export async function deleteFile(_0x2d26d8){const _0x594808=_0x30fcb0;try{return await _0x333e71['promises'][_0x594808(0x1f4)](_0x2d26d8,_0x333e71[_0x594808(0x1fe)]['F_OK']),await _0x333e71[_0x594808(0x1f6)][_0x594808(0x1f2)](_0x2d26d8),!![];}catch(_0xfde3b1){return console[_0x594808(0x1f8)](_0x594808(0x1f0)+_0x2d26d8+':',_0xfde3b1),_0x594808(0x1f0)+_0x2d26d8+':\x20'+_0xfde3b1['message'];}}
function _0x369b(){const _0x583462=['Invalid\x20file\x20extension.\x20Accepted\x20extensions\x20are:\x20','error','toLowerCase','now','join','35000oaFWwO','9OoqfIu','promises','getAll','35336wqvwWq','25IeGWBn','message','F_OK','files','extname','includes','createWriteStream','781330JrYHIT','920282TrNPwC','access','mkdir','2wtyPSF','formData','name','276472VkQFqf','196952huXeDZ','constants','28218GweAbz','12BEaDwW','slice'];_0x369b=function(){return _0x583462;};return _0x369b();}(function(_0x51b865,_0x3f5da7){const _0x33e970=_0x3f2b,_0xa8d8c1=_0x51b865();while(!![]){try{const _0x36ffbf=parseInt(_0x33e970(0x1ee))/0x1*(-parseInt(_0x33e970(0x1fc))/0x2)+-parseInt(_0x33e970(0x1f5))/0x3*(parseInt(_0x33e970(0x1e2))/0x4)+-parseInt(_0x33e970(0x1e3))/0x5*(-parseInt(_0x33e970(0x1f4))/0x6)+parseInt(_0x33e970(0x1f2))/0x7+-parseInt(_0x33e970(0x1f1))/0x8*(parseInt(_0x33e970(0x1fd))/0x9)+parseInt(_0x33e970(0x1ea))/0xa+parseInt(_0x33e970(0x1eb))/0xb;if(_0x36ffbf===_0x3f5da7)break;else _0xa8d8c1['push'](_0xa8d8c1['shift']());}catch(_0x13aaa5){_0xa8d8c1['push'](_0xa8d8c1['shift']());}}}(_0x369b,0x1a807));import _0x43abcb from'fs';import{pipeline}from'stream';import{promisify}from'util';const pump=promisify(pipeline),path=require('path');export async function Upload(_0x2d5f01,_0x118125,_0x3ea698){const _0x24f23a=_0x3f2b;try{const _0x4a3b9f=await _0x2d5f01[_0x24f23a(0x1ef)](),_0x99a790=_0x4a3b9f[_0x24f23a(0x1e1)](_0x24f23a(0x1e6))[0x0],_0x58cb74=path[_0x24f23a(0x1e7)](_0x99a790[_0x24f23a(0x1f0)])[_0x24f23a(0x1f9)]()[_0x24f23a(0x1f6)](0x1);if(!_0x3ea698[_0x24f23a(0x1e8)](_0x58cb74))return _0x24f23a(0x1f7)+_0x3ea698[_0x24f23a(0x1fb)](',\x20');const _0x3bdf02='./'+_0x118125;try{await _0x43abcb[_0x24f23a(0x1fe)][_0x24f23a(0x1ec)](_0x3bdf02,_0x43abcb[_0x24f23a(0x1f3)]['F_OK']);}catch(_0x56312d){await _0x43abcb[_0x24f23a(0x1fe)][_0x24f23a(0x1ed)](_0x3bdf02,{'recursive':!![]});}const _0x5e1139=Date[_0x24f23a(0x1fa)](),_0x3dfe8e='./'+_0x118125+'/'+_0x5e1139+'_'+_0x99a790[_0x24f23a(0x1f0)];return await pump(_0x99a790['stream'](),_0x43abcb[_0x24f23a(0x1e9)](_0x3dfe8e)),!![];}catch(_0x5579df){return _0x5579df;}}function _0x3f2b(_0x286e0e,_0xbd8141){const _0x369bcc=_0x369b();return _0x3f2b=function(_0x3f2be3,_0x19bf3b){_0x3f2be3=_0x3f2be3-0x1e1;let _0x5f3d36=_0x369bcc[_0x3f2be3];return _0x5f3d36;},_0x3f2b(_0x286e0e,_0xbd8141);}export async function deleteFile(_0x580537){const _0x48e97c=_0x3f2b;try{return await _0x43abcb[_0x48e97c(0x1fe)][_0x48e97c(0x1ec)](_0x580537,_0x43abcb[_0x48e97c(0x1f3)][_0x48e97c(0x1e5)]),await _0x43abcb[_0x48e97c(0x1fe)]['unlink'](_0x580537),!![];}catch(_0x1d702c){return console[_0x48e97c(0x1f8)]('Error\x20deleting\x20'+_0x580537+':',_0x1d702c),'Error\x20deleting\x20'+_0x580537+':\x20'+_0x1d702c[_0x48e97c(0x1e4)];}}
{
"name": "next-file",
"version": "1.0.4",
"version": "1.0.5",
"description": "Next-File is a lightweight npm package tailored for file management within Next.js applications. It simplifies the process of uploading files to your Next.js server and provides an easy-to-use interface for deleting files when they are no longer needed. With seamless integration into Next.js projects, this package offers robust functionality to handle file uploads and deletions efficiently, enhancing the development experience for Next.js developers.",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc