Edwardie Fileupload New Review
npm install edwardie-fileupload@new
Then in your JavaScript:
import EdwardieUploader from 'edwardie-fileupload';
const uploader = new EdwardieUploader('#upload-area',
action: '/upload-endpoint',
chunkSize: 1048576 // 1 MB
);
The quiet release of this update addresses three persistent frustrations with older file upload libraries:
Edwardie’s fileupload does exactly what it says on the tin. It isn't trying to be an enterprise solution—it is trying to be the simplest way to move a file from a POST request to a folder. For developers tired of configuration fatigue, this is a breath of fresh air, provided you are willing to write your own validation logic. edwardie fileupload new
The old version relied on XMLHttpRequest (XHR) level 1 with fallbacks to Flash (for older browsers). The new version:
import EdwardieUploader from 'edwardie-fileupload-new';const uploader = new EdwardieUploader( endpoint: 'https://api.yoursite.com/upload', chunkSize: 2 * 1024 * 1024, // 2MB chunks maxConcurrentChunks: 3, retryDelays: [1000, 3000, 5000], webTransport: true // Opt-in to new protocol ); npm install edwardie-fileupload@new
const fileInput = document.getElementById('fileInput'); fileInput.addEventListener('change', (e) => const file = e.target.files[0]; uploader.upload(file, onProgress: (percent, loadedBytes) => console.log($percent%), onChunkSuccess: (chunkIndex) => console.log(Chunk $chunkIndex done), onComplete: (fileId) => console.log(Upload complete: $fileId) ); );
npm install edwardie-fileupload-new
Or for CDN usage:
<script src="https://cdn.edwardie.dev/v4/edwardie-upload.min.js"></script>