Releases: uploadcare/uploadcare-rails
Releases · uploadcare/uploadcare-rails
v4.0.0
This is a major release that replaces the legacy jQuery-based widget with the new File Uploader built on Web Components.
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_tagnow loads File Uploader CSS and JS instead of the jQuery widget bundle.
Thebundle:parameter is removed; usesolution:instead ("regular","inline","minimal")uploadcare_uploader_fieldanduploadcare_uploader_field_tagnow 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
multiplefrommount_uploadcare_file_groupis preserved but can now
be overridden by passingmultiple:explicitly - Module
Uploadcare::Rails::ActionView::UploadcareWidgetTagsrenamed to
Uploadcare::Rails::ActionView::UploadcareIncludeTags - Configuration options renamed to match File Uploader API:
images_only→img_only,tabs→source_list,input_accept_types→accept,
preferred_types→external_sources_preferred_types,multipart_min_size→multipart_min_file_size,
preview_proxy→secure_delivery_proxy,cdn_base→cdn_cname,
camera_mirror_default→camera_mirror,crop→crop_preset do_not_storeis still used for server-side model callbacks (mount_uploadcare_file*).
File Uploaderstoreis 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_taghelper for including only File Uploader CSSuploadcare_uploaderhelper for rendering the uploader without a form inputuploadcare_config_taghelper for rendering a<uc-config>elementuploadcare_uploader_taghelper for rendering a<uc-file-uploader-*>elementuploadcare_ctx_provider_taghelper for rendering a<uc-upload-ctx-provider>elementuploadcare_form_input_taghelper for rendering a<uc-form-input>element- FormBuilder integration:
f.uploadcare_filefor use withform_with/form_for - Importmap generator:
rails g uploadcare_importmapfor Rails 7+ importmap setup - Importmap mode for
uploadcare_include_tag(importmap: trueloads only CSS) - Per-component configuration via
<uc-config>with global defaults from initializer - Rails 8.0 and 8.1 support
FILE_UPLOADER_PARAMSconfiguration constants for the new File Uploader options
Changed
- Widget script CDN changed from
ucarecdn.comtocdn.jsdelivr.net(for File Uploader assets) - Configuration now uses
uploader_config_attributes(returns Hash for Web Component attributes)
instead ofuploader_parameters(returned JS global variable assignments) - Generated config template (
rails g uploadcare_config) updated with new File Uploader options store_files_asyncanddelete_files_asyncdefault tofalsein generated config template
Deprecated
Uploadcare::Rails::Configuration#uploader_parameters— useuploader_config_attributesinsteadUploadcare::Rails::Configuration#widget— useuploader_config_attributesinstead- Legacy
WIDGET_PARAMSconfiguration parameters — useFILE_UPLOADER_PARAMSequivalents instead
Version 3.4.4
Added
- Add mongoid support for
mount_uploadcare_fileandmount_uploadcare_file_groupmethods.
Breaking Changes
- Drop support for Rails 6.1x in line with the currently supported Rails versions: https://rubyonrails.org/maintenance
Version 3.4.3
Added
- For
Uploadcare::ConversionApiaddedget_document_conversion_formats_infomethod to get the possible document conversion formats.
Version 3.4.2
Added
- Added API support for
AWS Rekognition ModerationAdd-On.
Version 3.4.1
Fixed
- Fixed invalid group id error when >= 10 files are uploaded when using
mount_uploadcare_file_group.
Version 3.4.0
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
Skip network requests when the file attribute was unchanged
Version 3.3.3
Improved readme to look better at ruby-doc
Version 3.3.2.1
Updated links in the gemspec
Version 3.3.2
- Fixed an issue with the configuration
- Updated the gem documentation