🚀 DAY 4 OF LAUNCH WEEK:Introducing Socket Scanning for OpenVSX Extensions.Learn more →
Socket
Book a DemoInstallSign in
Socket

@meniga/media

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meniga/media

latest
npmnpm
Version
6.3.0
Version published
Weekly downloads
49
2.08%
Maintainers
1
Weekly downloads
 
Created
Source

@meniga/media

The @meniga/media package includes a component to help with file upload

Usage

import { FileUploader } from '@meniga/media'

<FileUploader 
	ref={ t => this.fileUploader = t } 
	primary 
	light 
	onUpload={ this.handleUpload } 
	uploadFileText={ uploadButtonText } />

The onUpload callback will return the file you just uploaded, and you can use FileReader to read it.

Example:

this.handleUpload = (file, type) => {
	if(file) {
		const read = new FileReader();
		read.readAsText(file);

		read.onloadend = function(){
			const data = read.result || null
			const jsonData = JSON.parse(data)

			...
		}
	}
},

FAQs

Package last updated on 06 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts