node-file-api / file-api Goto Github PK
View Code? Open in Web Editor NEWHTML5 FileAPI for Node.js
License: Apache License 2.0
HTML5 FileAPI for Node.js
License: Apache License 2.0
The actual final File API is quite different from the implementation of this library.
Namely, the File()
constructor has a different signature:
new File(bits, name[, options])
https://developer.mozilla.org/en-US/docs/Web/API/File/File
I'd like to be able to have a consistent way to describe files across both client and server, so an up-to-date implementation of the File API as described on MDN (and implemented by modern browsers) would be necessary.
I'd be happy to implement this myself if you're open to a PR for it @coolaj86 @natlownes although it seems this repo is now dead, if I don't hear back from a maintainer that this work would be welcome I'll just create my own package from scratch, however I'd prefer to update this one to avoid polluting the NPM registry with similarly named packages having different implementations.
Hey. The latest node\mime packages have deprecated mime.lookup. change to mime.getType to avoid that issue.
4 years passed.
where 's blob?
Hi @coolaj86, I'm wondering what's the status and future of this project? I think it'd be cool to have this in node, especially for testing purposes. But also in general.
Have you found any replacement for it or just didn't have enough time to get closer to specs in this project?
Hi!
I'm creating a file using new FileAPI.File(path)
. Recently I reinstalled node_modules in the project and following error occurred: TypeError: mime.lookup is not a function
.
I checked node_modules and found that mime module version is 2.0.1. In this version API has been changes (e.g. lookup method was renamed). If I forced npm to install 1.2.11 and it works fine.
Please change mime version in package.json, e.g. "mime": "1.2.11"
(without "^") should fix it.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.