Multiple files upload/download

Added by Vitaly Klimov over 9 years ago

Intro

  1. Plugin adds the ability to upload and attach multiple files at once to issue, forum message or wiki page.
  2. Plugin adds the ability to select and download attached to issue/message/wiki page files as a ZIP archive.

Up to date plugin page

http://www.redmine.org/plugins/redmine_multiple_files_upload

Replies (13)

RE: Multiple files upload/download - Added by Vitaly Klimov over 9 years ago

Plugin updated.

  • Correct MIME types written when adding attachments
  • Added rake task to correct attachments MIME types (redmine:mfu_correct_mime_types) for already stored attachments

RE: Multiple files upload/download - Added by Radek Antoniuk over 9 years ago

The plugin is missing ZIP dependency info, you have to install additional gem manually.
Which gem are you using?
The 'zip' gem does not work with me:

NoMethodError (undefined method `write_buffer' for Zip::ZipOutputStream:Class):
  vendor/plugins/redmine_multiple_files_upload/app/controllers/multiple_files_upload_controller.rb:142:in `process_attachments_export'
  vendor/plugins/redmine_multiple_files_upload/app/controllers/multiple_files_upload_controller.rb:26:in `download_zip'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

RE: Multiple files upload/download - Added by Vitaly Klimov over 9 years ago

Sorry about it - forgot to mention that plugin relies on rubyzip gem

RE: Multiple files upload/download - Added by Radek Antoniuk over 9 years ago

Thanks, works fine.
I think you have a typo in the docs:

1config.middleware...

should be without '1'.

RE: Multiple files upload/download - Added by Vitaly Klimov over 9 years ago

Actually it 1 is appended as a line number by wiki engine :) so i removed definition of this code as a ruby code in description.

RE: Multiple files upload/download - Added by Vitaly Klimov about 9 years ago

Steven Wong wrote:

not support redmine 2.0.2
just see:

http://www.redmine.org/boards/3/topics/29795?r=31190

Sorry about that. Fixed in latest release.

Plugin updated to support Redmine 2.x.x.

RE: Multiple files upload/download - Added by Andrey Evdokimov about 9 years ago

errors in production.log when do folowing steps:
1. Go to the issue
2. Click "download as zip"
3. deselect all files
4. click "Download selected"

Started POST "/redmine/multiple_files_upload/download_zip" for 127.0.0.1 at Wed Jun 27 00:07:36 +0400 2012
Processing by MultipleFilesUploadController#download_zip as HTML
  Parameters: {"utf8"=>"✓", "commit"=>"Download selected", "authenticity_token"=>"H3SeKOVnpgEidv4DxyM06BwnDGy1i4bWsorN/1W8YCo=", "filename_search"=>"dum", "container_id"=>"1054", "container_type"=>"Issue"}
Completed 500 Internal Server Error in 16ms

NoMethodError (undefined method `each' for nil:NilClass):
  plugins/redmine_multiple_files_upload/app/controllers/multiple_files_upload_controller.rb:201:in `filter_attachments_list'
  plugins/redmine_multiple_files_upload/app/controllers/multiple_files_upload_controller.rb:27:in `download_zip'
  actionpack (3.2.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.6) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.6) lib/abstract_controller/callbacks.rb:18:in `process_action'
  activesupport (3.2.6) lib/active_support/callbacks.rb:458:in `_run__150226093__process_action__80420362__callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.6) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.6) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  activesupport (3.2.6) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.6) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.6) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.6) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/params_wrapper.rb:206:in `process_action'
  activerecord (3.2.6) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.6) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.6) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.6) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.6) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.6) lib/action_controller/metal.rb:246:in `action'
  actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.3) lib/journey/router.rb:68:in `call'
  journey (1.0.3) lib/journey/router.rb:56:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:600:in `call'
  rack-openid (1.3.1) lib/rack/openid.rb:98:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  plugins/redmine_multiple_files_upload/lib/flash_session_cookie_middleware.rb:17:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  activerecord (3.2.6) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `_run__48367539__call__4__callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.6) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.6) lib/action_dispatch/middleware/static.rb:62:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.6) lib/rails/engine.rb:479:in `call'
  railties (3.2.6) lib/rails/application.rb:220:in `call'
  railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `send'
  railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `method_missing'
  rack (1.4.1) lib/rack/urlmap.rb:64:in `call'
  rack (1.4.1) lib/rack/urlmap.rb:49:in `each'
  rack (1.4.1) lib/rack/urlmap.rb:49:in `call'
  thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
  thin (1.3.1) lib/thin/connection.rb:78:in `catch'
  thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
  thin (1.3.1) lib/thin/connection.rb:53:in `process'
  thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
  thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
  thin (1.3.1) lib/thin/server.rb:159:in `start'
  thin (1.3.1) lib/thin/controllers/controller.rb:86:in `start'
  thin (1.3.1) lib/thin/runner.rb:185:in `send'
  thin (1.3.1) lib/thin/runner.rb:185:in `run_command'
  thin (1.3.1) lib/thin/runner.rb:151:in `run!'
  thin (1.3.1) bin/thin:6
  bin/thin:16:in `load'
  bin/thin:16

RE: Multiple files upload/download - Added by Andrey Evdokimov about 9 years ago

Error after install plugin:

Started GET "/redmine/multiple_files_upload?container_id=1054&container_type=Issue" for 127.0.0.1 at Tue Jun 26 23:24:38 +0400 2012

LoadError (no such file to load -- zip/zip):
...

workaraund see here - http://stackoverflow.com/questions/5997539/using-rubyzip-error-no-such-file-to-load-zip-zip

RE: Multiple files upload/download - Added by Gurvan Le Dromaguet almost 9 years ago

Hi,

I want to have a try with this plugin, but I think I miss a lot of things there.
I installed the zip gem, but don't know what to do with the flash part. Is it on client or on server side ? how to install this ?
So long I have installed the plugin (and its dependency) that appears correctly in the plugins list now, but can't see any change in the upload files function.
Any screenshot of what it should look like ?

Thanks,

RE: Multiple files upload/download - Added by satya B almost 9 years ago

Hi Klimov,

Is this plugin compatible with redmine 2.1.0?

Thanks

RE: Multiple files upload/download - Added by osman kara over 8 years ago

Hi, thank you for this plugin.

I get internal server error when i send empty data in download zip.

I tracked from passenger and it gives this

NoMethodError (undefined method `each' for nil:NilClass)

Do you have a solution for this ?

RE: Multiple files upload/download - Added by Dmitry K over 8 years ago

Plugin doesn't work with 2.1.3.stable

Error message:

LoadError (cannot load such file -- zip/zip)

rubyzip gem installed:

gem list ruby*

*** LOCAL GEMS ***

ruby-openid (2.1.8)
rubygems-update (1.8.24)
rubyzip (0.9.8)

Redmine information:

Environment:
  Redmine version                          2.1.3.stable
  Ruby version                             1.9.3 (x86_64-linux)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  redmine_multiple_files_upload            0.2.1
  redmine_plugin_views_revisions           0.0.1

Installed from bitnami.org
New installation withowt any other plugins, only redmine_plugin_views_revisions and redmine_multiple_files_upload

(1-13/13)