Skip to content

Releases: uploadcare/uploadcare-rails

v4.0.0

02 Mar 10:31
dd51c06

Choose a tag to compare

This is a major release that replaces the legacy jQuery-based widget with the new File Uploader built on Web Components.

Migration guide from 3.x

Breaking Changes

  • Minimum Ruby version raised to 3.3+
  • Minimum Rails version raised to 7.2+
  • Replaced legacy jQuery widget with the new File Uploader (Web Components-based)
  • uploadcare_include_tag now loads File Uploader CSS and JS instead of the jQuery widget bundle.
    The bundle: parameter is removed; use solution: instead ("regular", "inline", "minimal")
  • uploadcare_uploader_field and uploadcare_uploader_field_tag now render Web Components
    (<uc-form-input>, <uc-config>, <uc-file-uploader-*>, <uc-upload-ctx-provider>)
    instead of hidden <input> elements. Method signatures now use keyword arguments
  • Auto-detection of multiple from mount_uploadcare_file_group is preserved but can now
    be overridden by passing multiple: explicitly
  • Module Uploadcare::Rails::ActionView::UploadcareWidgetTags renamed to
    Uploadcare::Rails::ActionView::UploadcareIncludeTags
  • Configuration options renamed to match File Uploader API:
    images_onlyimg_only, tabssource_list, input_accept_typesaccept,
    preferred_typesexternal_sources_preferred_types, multipart_min_sizemultipart_min_file_size,
    preview_proxysecure_delivery_proxy, cdn_basecdn_cname,
    camera_mirror_defaultcamera_mirror, cropcrop_preset
  • do_not_store is still used for server-side model callbacks (mount_uploadcare_file*).
    File Uploader store is a separate client-side setting and is not a drop-in replacement
  • Removed widget-specific configuration options with no File Uploader equivalent:
    live, manual_start, preview_step, clearable, system_dialog,
    audio_bits_per_second, video_preferred_mime_types, video_bits_per_second,
    locale_translations, locale_pluralize
  • Legacy widget parameters (WIDGET_PARAMS) are retained in Configuration for backward compatibility
    but are marked deprecated and no longer affect the new File Uploader

Added

  • File Uploader integration using Web Components (<uc-config>, <uc-file-uploader-*>,
    <uc-upload-ctx-provider>, <uc-form-input>)
  • uploadcare_stylesheet_tag helper for including only File Uploader CSS
  • uploadcare_uploader helper for rendering the uploader without a form input
  • uploadcare_config_tag helper for rendering a <uc-config> element
  • uploadcare_uploader_tag helper for rendering a <uc-file-uploader-*> element
  • uploadcare_ctx_provider_tag helper for rendering a <uc-upload-ctx-provider> element
  • uploadcare_form_input_tag helper for rendering a <uc-form-input> element
  • FormBuilder integration: f.uploadcare_file for use with form_with / form_for
  • Importmap generator: rails g uploadcare_importmap for Rails 7+ importmap setup
  • Importmap mode for uploadcare_include_tag (importmap: true loads only CSS)
  • Per-component configuration via <uc-config> with global defaults from initializer
  • Rails 8.0 and 8.1 support
  • FILE_UPLOADER_PARAMS configuration constants for the new File Uploader options

Changed

  • Widget script CDN changed from ucarecdn.com to cdn.jsdelivr.net (for File Uploader assets)
  • Configuration now uses uploader_config_attributes (returns Hash for Web Component attributes)
    instead of uploader_parameters (returned JS global variable assignments)
  • Generated config template (rails g uploadcare_config) updated with new File Uploader options
  • store_files_async and delete_files_async default to false in generated config template

Deprecated

  • Uploadcare::Rails::Configuration#uploader_parameters — use uploader_config_attributes instead
  • Uploadcare::Rails::Configuration#widget — use uploader_config_attributes instead
  • Legacy WIDGET_PARAMS configuration parameters — use FILE_UPLOADER_PARAMS equivalents instead

Version 3.4.4

07 Nov 17:56
f42c7f5

Choose a tag to compare

Added

  • Add mongoid support for mount_uploadcare_file and mount_uploadcare_file_group methods.

Breaking Changes

Version 3.4.3

02 Jun 18:41

Choose a tag to compare

Added

  • For Uploadcare::ConversionApi added get_document_conversion_formats_info method to get the possible document conversion formats.

Version 3.4.2

19 May 15:52
d3ac2ae

Choose a tag to compare

Added

  • Added API support for AWS Rekognition Moderation Add-On.

Version 3.4.1

24 Mar 17:37
db4cba0

Choose a tag to compare

Fixed

  • Fixed invalid group id error when >= 10 files are uploaded when using mount_uploadcare_file_group.

Version 3.4.0

05 Mar 09:10

Choose a tag to compare

Fixed

  • Documentation issue with uploadcare_include_tag

Breaking Changes

  • Drop support for Ruby < 3.x
  • Drop support for Rails < 6.1x

Version 3.3.4

19 Apr 19:31

Choose a tag to compare

Skip network requests when the file attribute was unchanged

Version 3.3.3

27 Mar 18:33
428a7e6

Choose a tag to compare

Improved readme to look better at ruby-doc

Version 3.3.2.1

26 Mar 14:13
ba3a9c1

Choose a tag to compare

Updated links in the gemspec

Version 3.3.2

26 Mar 12:55
4afbb15

Choose a tag to compare

  • Fixed an issue with the configuration
  • Updated the gem documentation