You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit of an abstract concept. I'd need to get a list of all files which are successfully uploaded, but not dynamically, i.e. not right after they are completed i.e. not using fileSuccess event.
Context:
A user uploads a few files. Then deletes some. Then uploads some more, etc.
When they are satisfied with the result, the files can be now processed further, in PHP.
The user clicks on a "ready" button and PHP automagically receives a list of files registered with ng-flow,
i.e. those visible in the 'completed' table, e.g. one featured in https://github.com/flowjs/ng-flow/blob/master/samples/basic/index.html and listed by <tr ng-repeat="file in $flow.files">
I am versed with PHP, and only green with Javascript. Any help and possibly a sample code (what to add to app.js) would be very welcome. Many thanks.
The text was updated successfully, but these errors were encountered:
The main problem here is that any files which could be recorded with PHP, are the files which were successfully uploaded to the server. If a user clicks "cancel" in flow.js/ng-flow (for example using an UI similar to https://github.com/flowjs/ng-flow/blob/master/samples/basic/index.html) and clears their list of uploaded files, or cancels a particular file, PHP doesn't know which files are "good to go" and which are not, as it only assembles chunks into complete files.
What would be needed here is some kind of mechanism to basically let PHP know which of the successfully uploaded files to keep and which can be discarded. Best by a button click I think, as explained above.
Okay, the very first and amateurishly crude solution would be to add a form using ng-repeat="file in $flow.files" and then a hidden input for each {{file.uniqueIdentifier}} and submit that as an extra request independent of flow's mechanics. Does the job.
Is there a better way, using flow.js/ng-flow's internals?
This is a bit of an abstract concept. I'd need to get a list of all files which are successfully uploaded, but not dynamically, i.e. not right after they are completed i.e. not using
fileSuccess
event.Context:
i.e. those visible in the 'completed' table, e.g. one featured in
https://github.com/flowjs/ng-flow/blob/master/samples/basic/index.html
and listed by<tr ng-repeat="file in $flow.files">
I am versed with PHP, and only green with Javascript. Any help and possibly a sample code (what to add to app.js) would be very welcome. Many thanks.
The text was updated successfully, but these errors were encountered: