Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
No upload information when we allow multiple values for the file field. I funno what kind of info you'd need if you need some :D.
Keep up the good job.
Comment | File | Size | Author |
---|---|---|---|
#5 | filefield_nginx_progress-fix_multiple_values-1220826-5.patch.patch | 2.31 KB | skylord |
Comments
Comment #1
Hamulus CreditAttribution: Hamulus commentedsame problem in D6
tested on two FF - progressbar not working with multiple values fields
Comment #2
perusio CreditAttribution: perusio commentedI'm having a look at this now. See also: http://drupal.org/node/1842478.
Comment #3
FalkNisius CreditAttribution: FalkNisius commentedAll problems for FileField Nginx progress result in the implementation of FileField what not respect additional pathes like x-progress-id, included from nginx progress.
For drupal 7.22 I have following solutions:
The first solution for single filefields (cardinality == 1) is to change the
File: /modules/file/file.module
Function: file_ajax_upload()
The code assumes, that the last part of the formpath is the formbuildid. That isn't correct if widgets added some pathinfo. We can add the progress-id pathinfo in front of the formbuildid and change the nginx.conf to find the progress-id, or we can change the file.module to ignore additional pathes. I choose the second approach and pop the pathparts until one have the form: form-
The second solution for multiple filefields (cardinality > 1) is to change the
File: /modules/file/file.field.inc
Function: file_field_widget_process( $element, &$form_state, $form )
The code flattens the ajax informations and remove the number of the value of the field. For this, the code build a new path without respecting the included x-progress-id. This code has to change. One variant is to punch the value number out of the path, the other is to detect additional x-progress-id and save the progress-id. I choose the second way, because it was easier for me, I think the first approach is the clearer one also for other widgets.
Comment #4
Heihachi88 CreditAttribution: Heihachi88 commentedPerusio, how's progress going on regarding multiple fields?
Comment #5
skylord CreditAttribution: skylord commentedEncountered this issue recently... Here is the patch (for 2.3 version). To override data set by "file_field_widget_process" we move all upload button alterations to it's own process handler. Works OK for me.
Comment #6
Kristina Katalinic CreditAttribution: Kristina Katalinic commentedI was actually able to apply patch from #5 to the latest .dev version of filefield_nginx_progress.module and progress bar is working on unlimited value file field.
But I can see some errors in my sites error.log which I am unable to interpret and thus I did not change the issue status. Perhaps someone can interpret these errors? Its perusios nginx configuration I have just set up today and I am not sure everything is working as it should....
Comment #7
MustangGB CreditAttribution: MustangGB commentedThis seems like a pretty big wtf, and certainly a bug report rather than a feature request.
Comment #8
MustangGB CreditAttribution: MustangGB commentedWhoops, also meant to add that I've tested and used #5, and it's working as advertised.
Comment #9
ispboy CreditAttribution: ispboy commentedThe patch is working, thanks!
Comment #10
MustangGB CreditAttribution: MustangGB commentedAny maintainers around?