Comments (5)
Looking at this now. First task: when an upload is stopped, need to add an "Abort button". This would clear the chunks from the upload directory and remove the upload from the list.
from b2share.
So progress so far:
I've added an "Abort" button which only shows when the upload is stopped.
I'm trying to understand how to do anything with the button.
In simplestore-deposit.js are the following lines for dealing with the Start and Stop buttons.
$('#uploadfiles').click(function(e) {
$('#stopupload').click(function(d) {
Can anyone explain what 'd' and 'e' are in this context? How would I use this to call a python function which would clear the upload folder of the unwanted chunks?
I looked at the plupload documentation regarding chunks, and not having to upload a file in full if some of the chunks had already been uploaded. It says:
"In real world scenario you might want to store the chunks as separate files and combine them only after all of them are uploaded. This way you will be able to monitor the state of each chunk, request reuploading of the failed one, resume paused or failed uploads, etc.
There is an effort currently to build a convenient server-side handler class, that will handle it all. We are going to translate it into various server-side languages once it's ready. You can contribute if you want and are proficient in - some :)"
I couldn't find any other way to resume an upload, so if it is possible at all, it looks like it will have to be done the hard way.
from b2share.
The javascript code in question is a jQuery call to bind an event handler for any click event generated on the DOM elements with the id 'uploadfiles' and 'stopupload'. The e and d are parameters to the event handler function, and in this case are eventObject. More to be found at http://api.jquery.com/click/ and http://api.jquery.com/category/events/event-object/
from b2share.
There is a quite good system for uploading and sharing big data. They have an HTML5 upload with stop and resume feature and support for big files. I don't know whether their architecture is such that we could integrate the upload part from them: http://filesender.org
from b2share.
Just came across a jQuery File Upload widget that looks very similar to what we are using, but it supports resuming uploads by using chunked upload (like we do) and remembering uploaded bytes.
from b2share.
Related Issues (20)
- Displaying a community with no block schema fails HOT 1
- The "(admin page)" link on the community admin profile page is broken HOT 3
- Delete draft button not working
- Add support for contenthash for b2share-bundle.js building HOT 1
- Show PID or DOI even if one of them is missing. HOT 1
- Elasticsearch field `country` in `file-download` mapping overlaps with other type HOT 1
- Change B2ACCESS scopes to OpenID scopes HOT 1
- travis.yml needs to be updated
- Improve root schema upgrade procedure HOT 2
- Draft records sometimes result "No results", even when records exist.
- Validation error when adding optional geospatial meta data HOT 2
- Feature request: Share editor rights for published records
- Update B2ACCESS configuration
- Bug: Special chars in OAuth2 secret
- Add citation feature
- HTTP server doesn't seem to support byte ranges
- single value box in spatial coverage are labeled with boxes
- Use https instead of http when copying DOI or Handle pid from UI to clipboard
- Cannot update / replace / delete file in existing data publication
- Cannot create ePIC PIDs for the existing records via CLI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from b2share.