View Issue Details

IDProjectCategoryView StatusLast Update
0015774mantisbtattachmentspublic2016-09-01 10:46
Reporterviktor.minko Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.15 
Target Version1.2.16Fixed in Version1.2.16 
Summary0015774: Incorrect number of attached files
Description

I'm trying to enable multiple files uploading by adding "multiple" html5 attribute to single file input (by the way it would be good to have an option for that in config). It works well, except that I'm able to upload not more then 5 files. I think the problem is that number of attached files determined incorrectly.

Additional Information

I think the problem is in bug_file_add.php around lines 55-58:

// Process array of files to upload
for( $i = 0; $i < count( $f_files ); $i++ ) {

I think it shoud be:
// Process array of files to upload
for( $i = 0; $i < count( $f_files['name'] ); $i++ ) {

TagsNo tags attached.

Relationships

related to 0005228 closeddregad Attaching multiple files in one go. 
related to 0017325 closeddregad helper_array_transpose should always return an array 

Activities

viktor.minko

viktor.minko

2013-04-22 17:45

reporter   ~0036644

The problem occurres in other places, e.g. at bug_report.php

dregad

dregad

2013-04-23 11:05

developer   ~0036648

I was going to write that it sounded like you are customizing the MantisBT core and therefore not supported, then I had a quick look at the code and realized that you are absolutely right.

I remember that when writing this code, I only performed basic unit-tests it with no more than 3 attachments. The changes were then pushed to core by rombert, who apparently did not catch the issue either ;-).

Thanks for reporting the issue.

Regarding your "multiple html5 attribute to single file input (by the way it would be good to have an option for that in config)", sounds like customizing the core. Why don't you propose a patch when you have it working, we'll see if it can be integrated.

dregad

dregad

2013-04-23 11:33

developer   ~0036649

Please test [1] and let me know your feedback

[1] https://github.com/dregad/mantisbt/commits/fix-15774

dregad

dregad

2013-05-01 06:57

developer   ~0036756

Did you get a chance to test ?

viktor.minko

viktor.minko

2013-05-01 07:13

reporter   ~0036757

Not yet, I'm using mantis with lots of core customization, and don't have a clean system to test now

Related Changesets

MantisBT: master-1.2.x 3ee6137c

2013-04-23 07:27

dregadmin

Committer: dregad


Details Diff
New helper_array_transpose api function

Required for issue 0015774
Affected Issues
0015774
mod - core/helper_api.php Diff File

MantisBT: master-1.2.x 4bb2be6f

2013-04-23 07:30

dregadmin

Committer: dregad


Details Diff
Fix 0015774: unable to simultaneously upload > 5 files Affected Issues
0015774
mod - bug_file_add.php Diff File
mod - bug_report.php Diff File