View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005228 | mantisbt | attachments | public | 2005-02-09 09:23 | 2018-06-14 02:36 |
Reporter | Daz01 | Assigned To | dregad | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 0.19.2 | ||||
Target Version | 1.2.10 | Fixed in Version | 1.2.10 | ||
Summary | 0005228: Attaching multiple files in one go. | ||||
Description | It seems that you cannot attach multiple attachments at once and need to keep going back to an issue attaching one file at a time, which is a real pain. | ||||
Tags | patch | ||||
Attached Files | |||||
related to | 0003759 | confirmed | Duplicate bug is created when resubmitting after file upload failure | |
related to | 0015721 | closed | grangeway | Functionality to consider porting to master-2.0.x |
has duplicate | 0005619 | closed | thraxisp | More Attachments at bug_report_page.php |
has duplicate | 0006657 | closed | ryandesign | can not upload more than one file when reporting new issue |
has duplicate | 0007221 | closed | ryandesign | Uploading multiple files during creating a new issue is not possible |
has duplicate | 0009329 | closed | giallu | Upload multi file at report issues |
has duplicate | 0009907 | closed | giallu | Upload multiple files |
has duplicate | 0010147 | closed | giallu | Add functionality to enable multiple file uploads at a time per issue |
has duplicate | 0012526 | closed | atrol | How to add multiple files to the issue at issue report |
has duplicate | 0010223 | closed | giallu | Issue in multiple file upload using mantis 1.2.0a3 |
has duplicate | 0013279 | closed | atrol | Attachment problem |
has duplicate | 0013297 | closed | dregad | ability to attach/remove multiple files, as many as needed, current system broken |
related to | 0014113 | new | Poor error handling when attaching multiple files and at least one upload fails | |
related to | 0014306 | closed | atrol | Tabbing is not functioning as expected |
related to | 0015774 | closed | dregad | Incorrect number of attached files |
related to | 0024541 | closed | atrol | Request to provide to add multiple attachments and also when closing the issue |
For what it's worth guys, I saw this this morning: For the interface side of things, I thought it was perfect for the job at hand. I will try and integrate it and see where I end up with it... |
|
Did anyone resolve this in the end? |
|
Would it be possible to just let the browse dialog that comes up be multiple select capable, and then either just put all the files that are needed to be uploaded in the textbox seperated by a semi-colon (which can then be used as a delimiter to loop around) or to dynamically create as many text boxes that are needed? We would also find this feature very useful. |
|
This would be a useful feature indeed. |
|
I've attached multiple_files.zip. |
|
I tried the multiple_files.zip above, but with no success. It still does not allow multiple files. I'm going back through to make sure that all the changes were made properly. No crashes upon implementing, just not additional functionality. |
|
OK, finally came back to this one and reran through all the code entries by hand. Appears to work properly in FF, but in IE6 it does not activate the new functionality. No breakage, just doesn't run. Page comes up with the following errors in IE6: Error: 'MultiSelector' is undefined |
|
Clarification to the above: Tested it at home, and it does not work in IE7 either. Same error comes up ("Page loads but with errors"). |
|
Hi phoenixcreation. |
|
Hi seji, I've applied your patches to the latest MANTIS release 1.1.0rc3 and it works fine. One minor flaw I see: Two "upload file" buttons that have the same functionality. Was this done deliberately? regards, |
|
Hi seji, me again. Thanks for distributing them, |
|
Confirmed. Works on IE6 here at work and on IE7 at home. Very nice. :) Appreciate the work! |
|
Will this patch find it way in on of the next releases? |
|
Applied this patch manually to 1.1.4 and double checked my work. DOES NOT WORK.. When click browse to select, no list comes up.. Then when hit upload, you get APPLICATION ERROR #1100 What am I doing wrong? |
|
Works fine here with all Mantis releases since early 1.1.0 RCs. |
|
Dear All, I tried to implement this Feature, in my application. I am able to add multiple files, but while im trying to click 'Upload File' button, it is throwing an error as Please share your thoughts; Regards, |
|
FYI: Im using mantis 1.2.0a3 Regards, |
|
As this functionality works fine for you, please let me know what would be wrong in myself. I have added all the changes that have been mentioned in patch.txt; however when im using browse button files get add to the list and while i am trying to hit 'Upload File' button i am facing this issue. Please share your thoughts in this. REgards, |
|
@ Prabhu So far I've only implemented this in the Mantis 1.1.x branches which works fine, I don't have any clue about this in Mantis 1.2.x. I'm sorry. Cheers, |
|
Hi Stefan, Thanks for your early reply; However, any guess on this error message, why this happens. Is there any format for the files to be uploaded, do we have to perform any settings in our manage projects, to upload files. Please i don't thing this may be version compatible, as it works fine in 1.1, it should any way work in 1.2; Or can you please post me your 'Patch.txt' file which you have used. Regards, |
|
The error is thrown in the file_api.php script when the file is not readable (!is_readable). |
|
Yes i could upload files before applying the patch. I would save in DATABASE. |
|
Also i could see the attached file in my mantis_bug_file_table. Why it could not read this file after applying the patch. But the same file i could upload before applying the patch. |
|
I also save my attachements in the database, so this could not be the problem then. Have you implemented the patch manually, i.e. migrate the patches which were written for an old Mantis 1.1.x release into new sources of mantis 1.2.x, or did you use a tool that automatically merged the patch into the sources? But this is all just guessing now... |
|
No stefand; I manually applied the changes to 1.2 release. |
|
In this patch, they have added some lines 'error_parameters($p_filename)' in file_api.php, what this means? |
|
To hunt the issue down: When does this error happen? This is handled in two different files: Could you pls try both methods and let us know what happens. |
|
I tried to create a new bug and uploaded a file to the bug and clicked 'Submit' in Report issue page, but the file is not uploaded. Also later once the bug is created, i tried to upload the same file, but it is throwing the error message. Also i tried to upload a file to already existing file, it throws the same error. |
|
I have an clarification, in the above patch.txt file, some changes are asked to do in core/html_api.php file; Where to add those script, 'function html_multiupload_script()'. I think i am doing something wrong in this changes. |
|
Can you please attach your core/html_api.php file, for reference |
|
I could not even create a new bug from report issue page, if i upload any file. It is throwing the same error message. |
|
Attached is an archive including all changed files against Mantis release 1.1.6. |
|
Yes. I used the updated multifile.js. Ok let me check with your files and let you know the status. Thanks a lot Stefang. |
|
Or simply use: |
|
Please go through the line mentioned in bug_file_upload_inc.php '<input id="file" name="file[]" type="file" size="40" />' in this the 'id' and 'name' attribute should be same. |
|
What do you mean by "should be the same"? Is my implementation wrong or what? At least it is exactly what the patch.txt has and for ME it is working and for you not... Did you succeed with your implementation of my changes? |
|
I am still facing the same issue. However, the HTML standard is 'id' and 'name' attribute value should be same, as Firefox will access by 'id' and Internet Explorer will access by 'name' attribute. But i am not saying because of this it is not working for me, But i do not know the exact reason. Can you get me. Please be patient, if i am wrong in any means. |
|
However I need your help in this. |
|
I am having the same issue of having the work against my new 1.2.1 deployment. The JS works (able to "attach" on the screen, but when we go to submit a new issue, or update an existing one, it is unable to find the files for upload. We are using the alternative version provided above that lists one browse line per file allowed, but that is a little kludgy (no offense) compared to JS version. We had to decrease our max files from 10 to 5 because it added too much to the screen. Any ideas on how to get this working against a 1.2.1 implementation? Thanks! |
|
I have uploaded the MANTIS1.2.3_UPLOAD_MULTIPLE ZIP file which has 4 PHP files. Unzip them and copy all the 4 to your main Mantis folder (so next to your config_inc.php). 3 files (out of the 4) in the ZIP will overwrite files on your server so however the solution is tested I recommend to create a backup of those files. Then go to your config_inc.php and add the following variable: $g_max_file_num = 2; where the number equals the maximum number of files you want to upload at the same time. (2-3 is recommended) This ends up in a change in the issue reporting and the issue viewing page where now you are able to add more files at the same time. The solution is tested under Mantis 1.2.3 and it affects only 3 + 1 files so it is a pretty straightforward operation. The "View issue" page mod comes from Cas (see issue the related issue 0010223), the "Report issue" page mod comes from me (see related issue 0012526) |
|
@rombert - I had started messing around with this towards end of 2011, but never had the time to finish things... You may want to have a look at the work-in-progress (see the upload-* branches on my github fork), maybe there's something you can reuse. |
|
(In reply to comment 0005228:0031498)
I'll do that, thanks! |
|
(In reply to comment 0005228:0031498)
Damien, I've taken a look at your upload-multi branch and as far as I can tell this is feature complete. I've added to the docbook documentation but that's about it. Did you plan on doing anything else? |
|
To be honest that's a long time ago so you're asking much from my poor Swiss-cheese brain ;-) As far as I can remember, I had most of the code down, and had started on testing but never finished. I vaguely recall facing issues with error handling, hence the 2 experimental sub-branches, but that might also have been an attempt at fixing the duplicate bug creation issue 0003759. Note also the missing bug ID in comment for commit 492df564 - I guess I meant to open a new issue for that on the tracker and then forgot to do it. I think the comment should be amended. I was also thinking about improving the interface using jQuery to dynamically display additional download fields only when they are needed instead of needlessly cluttering the UI with unnecessary fields and buttons. |
|
Keep in mind that ATM phpBB tries to get similar things done in "Google Summer of Code" [1] [1] http://wiki.phpbb.com/GSoC/2012/Ideas#Attachment_Improvements |
|
@atrol I did have a look at a couple of implementations for multi-upload using either js or jQuery, but never went further than that. Thanks for the references anyway. Might be useful in avoiding reinventing the wheel. |
|
This is now fixed in both master and master-1.2.x. Damien, thanks for your work, I merely documented and pushed the changes. |
|
the HTML5 multi-upload for sf.net is an open source project and it seems to work fairly well and handles fairly large files. it's slick. the html5 upload I saw automatically added file browse buttons as needed, you could select multiple files in your upload for one browse button. so essentially, you can go wild with it. it even I think gives a progress bar while you upload. |
|
(In reply to comment 0005228:0031526)
That would be of interest to me. The only note is that, as atrol has noted, we need to work without javascript and we can't rely on jQuery in the 1.2 branch. We can implement it in the 1.3 branch however. |
|
http://pypi.python.org/pypi/gp.fileupload/1.1 |
|
I just re-checked, and indeed as I mentioned in 0005228:0031506, the error handling for simultaneous upload of several files is not satisfactory in my opinion. That is why I did not commit my code back then and started experimenting with alternate error handling solutions (branches upload-err-hndl and upload-err-conv. Test case: config_inc.php$g_file_upload_max_num = 3; a. attach several documents: file1, size < 1000; file2, size > 1000; file3, size < 1000 This is is confusing to users, and furthermore if you do the same when reporting a new issue and then resubmit, you get duplicate issues (see 0003759) |
|
@dregad : how would you see this work? Skipping the failed upload and continuing? Reverting all uploaded files? |
|
I think a failed upload should trigger a warning and let the operation continue. Ideally the confirmation page should display the status of overall operation, listing any file upload failures. I believe such a solution would also resolve 0003759. |
|
is error 500 caused by file permissions? |
|
Marking as resolved in preparation for 1.2.10 release, as discussed with vboctor on the mailing list today. I'll open a separate issue to track the problem with error handling on failed uploads. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master 5c7dab02 2011-11-20 23:46 Details Diff |
Add multiple file upload functionality Adds a new option in config_defaults_inc.php (file_upload_max_num) to determine how many files can be simultaneously uploaded. Modifies the code in issue reporting and view details pages, to enable the new functionality. Fixes 0005228 Conflicts: bug_file_add.php config_defaults_inc.php |
Affected Issues 0005228 |
|
mod - bug_file_add.php | Diff File | ||
mod - bug_file_upload_inc.php | Diff File | ||
mod - config_defaults_inc.php | Diff File | ||
MantisBT: master-1.2.x 4599c5ba 2011-11-20 23:46 Details Diff |
Add multiple file upload functionality Adds a new option in config_defaults_inc.php (file_upload_max_num) to determine how many files can be simultaneously uploaded. Modifies the code in issue reporting and view details pages, to enable the new functionality. Fixes 0005228 |
Affected Issues 0005228 |
|
mod - bug_file_add.php | Diff File | ||
mod - bug_file_upload_inc.php | Diff File | ||
mod - config_defaults_inc.php | Diff File | ||
MantisBT: master 0d5182eb 2011-11-21 00:39 Details Diff |
Add multi-file upload to bug reporting page Fixes 0005228 Conflicts: bug_report.php bug_report_page.php |
Affected Issues 0005228 |
|
mod - bug_report.php | Diff File | ||
mod - bug_report_page.php | Diff File | ||
MantisBT: master-1.2.x 2648708b 2011-11-21 00:39 Details Diff |
Add multi-file upload to bug reporting page Fixes 0005228 |
Affected Issues 0005228 |
|
mod - bug_report.php | Diff File | ||
mod - bug_report_page.php | Diff File | ||
MantisBT: master 6f5b3dfe 2011-11-21 00:53 Details Diff |
I18l support for multi-file upload Adds new strings to handle the plurals when uploading multiple files (e.g. "Upload File" / "Upload Files") and conditionally display the appropriate one depending on value of file_upload_max_num Fixes 0005228 Conflicts: bug_file_upload_inc.php bug_report_page.php lang/strings_english.txt |
Affected Issues 0005228 |
|
mod - bug_file_upload_inc.php | Diff File | ||
mod - bug_report_page.php | Diff File | ||
mod - lang/strings_english.txt | Diff File | ||
MantisBT: master-1.2.x b33cacb9 2011-11-21 00:53 Details Diff |
I18l support for multi-file upload Adds new strings to handle the plurals when uploading multiple files (e.g. "Upload File" / "Upload Files") and conditionally display the appropriate one depending on value of file_upload_max_num Fixes 0005228 |
Affected Issues 0005228 |
|
mod - bug_file_upload_inc.php | Diff File | ||
mod - bug_report_page.php | Diff File | ||
mod - lang/strings_english.txt | Diff File | ||
MantisBT: master 9b43e690 2011-11-21 04:39 Details Diff |
Remove duplicate error code and message There were two separate error constants defined, ERROR_DUPLICATE_FILE and ERROR_FILE_DUPLICATE, corresponding to an error message string with identical text. This commit removes the redundant constant ERROR_DUPLICATE_FILE and the corresponding error message. Fixes 0005228 Conflicts: lang/strings_english.txt |
Affected Issues 0005228 |
|
mod - core/constant_inc.php | Diff File | ||
mod - core/file_api.php | Diff File | ||
mod - lang/strings_english.txt | Diff File | ||
MantisBT: master-1.2.x 08a3d4fc 2011-11-21 04:39 Details Diff |
Remove duplicate error code and message There were two separate error constants defined, ERROR_DUPLICATE_FILE and ERROR_FILE_DUPLICATE, corresponding to an error message string with identical text. This commit removes the redundant constant ERROR_DUPLICATE_FILE and the corresponding error message. Fixes 0005228 |
Affected Issues 0005228 |
|
mod - core/constant_inc.php | Diff File | ||
mod - core/file_api.php | Diff File | ||
mod - lang/strings_english.txt | Diff File |