A simple upload manager written with Backbone.js.
sroze / backbone-upload-manager Goto Github PK
View Code? Open in Web Editor NEWAn upload manager written using Backbone.js
An upload manager written using Backbone.js
A simple upload manager written with Backbone.js.
I get this error when i have click button#btn-cancel
TypeError: self.collection is undefined
i don't know if i'm writing it in the right place,
but is there a chance to add direct upload to amazon s3?
Update the documentation with options.
Notice the formData
options from #3
Hi,
The plugin Works perfectly starting from IE10, but IE9 and below throws errors related to functions like 'indexOf' (not available in older versions), but I can easily handle this with a simple polyfill. The error that is bothering me happens right after you select a file from the file dialog:
SCRIPT5009: 'size' is not defined
backbone-upload-manager, line 3 char 1
Line 3 from the aforementioned file has nothing but the script's copyright info, so it's being very difficult to figure what's wrong here.
What can I do to fix this? TYVM.
I just discovered backbone.upload-manager.js
uses a Backbone view called DeferedView
, which happens to be defined in /sample/vendor/js/backbone.defered-view-loader.js
.
Why in the world is the package dependent on files in the sample directory? Isn't sample meant to house demos? If there are other Backbone packages which are dependencies for this project, they should be defined somewhere.
Ideally the package would be self contained. It would first check for the existence of the DeferedView object, and if it doesn't exist, it has the code to create it within the package itself.
File: backbone.upload-manager.js
Function: Backbone.UploadManager.bindProcessEvents()
this.uploadProcess.on('fileuploadfail', function (e, data) {
$.each(data.uploadManagerFiles, function (index, file) {
var error = "Unknown error";
if (typeof data.errorThrown == "string") {
error = data.errorThrown;
} else if (typeof data.errorThrown == "object") {
error = data.errorThrown.message;
} else if (data.result) {
if (data.result.error) {
error = data.result.error;
} else if (data.result.files && data.result.files[index] && data.result.files[index].error) {
error = data.result.files[index].error;
} else {
error = "Unknown remote error";
}
}
self.trigger('filefail', file, error);
});
})
Description:
'fileuploadfile' is firing event even if the file was successfully posted to the server. data.state is "error" and data.message says something like Uploaded bytes is more than maximum size.
The whole page refreshes after thus not showing the error on the file view.
In my app as well as the demo page, clicking on Cancel Uploads only removes half of the files in the queue.
After added a file, then click cancel.
Then add the same file again and it won't appears.
This is due to the value of input fileUploadId does not clean after each removal.
in mozila it's showing cross button on click start upload button and does not upload multiple files, only upload first file (in a few cases, in most of does not upload any file)
Create a bower package and create a release process.
To make it consistent FileModel, FileCollection, FileView.
But I got some errors when rename File to FileModel, any idea?
I'm having this issue and I've tried to change things on my own, but with little success.
I figured out that the "updateProgress" method is not called properly to update the upload status (even for big files). But this happens only if the autoUpload option is set to true, as aforementioned.
Edit
The updateProgress is called allright, the "hidden" class is removed but the progress bar does't shows up.
Edit 2
A workaround:
Remove the "hidden" class from the progress element on the template file
Comment the line (or around) 433, where the "hidden" class is added, like so:
if (this.model.isPending()) {
// when_running.add(when_done).addClass('hidden');
when_pending.removeClass('hidden');
} else if (this.model.isRunning()) {
when_pending.add(when_done).addClass('hidden');
when_running.removeClass('hidden');
} else if (this.model.isDone() || this.model.isError()) {
when_pending.add(when_running).addClass('hidden');
when_done.removeClass('hidden');
}
Would you ever consider adding chunking?
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.