Skip to content

Releases: uploadcare/pyuploadcare

Version 6.0.0

24 Sep 13:32
1a1b08a
Compare
Choose a tag to compare

In this release, we introduce File Uploader v1, now with semantic versioning starting from v1.0.0.

For details on upgrading, refer to the migration guide.

Full Changelog: v5.1.0...v6.0.0

Version 5.1.0

09 Apr 12:31
114d177
Compare
Choose a tag to compare

Added

Changed

  • Blocks have been updated to v0.36.0
  • For ImageTransformation:
    • The overlay() and overlay_self() methods now treat overlay_width and overlay_height parameters as optional.
    • Unified gif2video(), gif2video_format(), and gif2video_quality() methods into a single gif2video() method. The format and quality parameters can now be accepted directly in the gif2video() method.
  • Black dev dependency has been updated to 24.3.0.

Fixed

  • Django forms: Any modifications made in an image editor are now correctly restored when editing the same image again. Previously, the editor state was not restored, and the original image was displayed instead. via uploadcare/blocks#615.

Deprecated

  • For ImageTransformation:
    • Deprecated the separate gif2video_format and gif2video_quality methods. Please use the format and quality parameters directly in the gif2video method for setting these properties.

Full Changelog: v5.0.1...v5.1.0

Version 5.0.1

02 Mar 19:47
114bc98
Compare
Choose a tag to compare

Changed

Fixed

  • The SSL context is now cached by default, resulting in significant performance improvements when initializing the Uploadcare class frequently. #279
  • Removed the warning for the usage of the deprecated pydantic.utils.deep_update #283

Full Changelog: v5.0.0...v5.0.1

Version 5.0.0

28 Dec 13:42
824c1b6
Compare
Choose a tag to compare

In version 5.0, we introduce a new file uploader, which is now the default for Django projects. If you prefer to continue using the old jQuery-based widget, you can enable it by setting the use_legacy_widget option in your configuration:

UPLOADCARE = {
    ...,
    "use_legacy_widget": True,
    "legacy_widget": {
        "version": "3.x",
    }
}

Additionally, please take note that some settings have been renamed in this update (see the next section).

Breaking Changes

  • Python 3.6 and 3.7 are no longer supported.

  • Django 1.11, 2.0, and 2.1 are no longer supported.

  • Pydantic has been updated to Version 2. Projects dependent on Pydantic Version 1 may encounter errors due to incompatibility between Versions 1 and 2.

  • Removed tox.ini. The recommended method for running tests locally is now through act with Docker.

  • for Django settings (UPLOADCARE = {...}):

    • widget_* settings were renamed and moved:
      • UPLOADCARE["widget_version"] to UPLOADCARE["legacy_widget"]["version"]
      • UPLOADCARE["widget_build"] to UPLOADCARE["legacy_widget"]["build"]
      • UPLOADCARE["widget_variant"] to UPLOADCARE["legacy_widget"]["build"] (this is not a typo: former widget_build and widget_variant settings were equialent)
      • UPLOADCARE["widget_url"] to UPLOADCARE["legacy_widget"]["override_js_url"] and works regardless of use_hosted_assets value.
  • for pyuploadcare.dj.conf:

    • Individual variables were moved into one dict called config. If you've accessed these settings from pyuploadcare.dj.conf module in your code, please migrate:
      • pub_key to config["pub_key"]
      • secret to config["secret"]
      • cdn_base to config["cdn_base"]
      • upload_base_url to config["upload_base_url"]
      • use_hosted_assets to config["use_hosted_assets"]
      • widget_version to config["legacy_widget"]["version"]
      • widget_build to config["legacy_widget"]["build"]
      • uploadcare_js to get_legacy_widget_js_url()
    • Gone from pyuploadcare.dj.conf:
      • widget_filename
      • hosted_url
      • local_url
  • for pyuploadcare.dj.forms:

    • FileWidget renamed to LegacyFileWidget. FileWidget is an all-new implementation now.
    • By default, FileWidget is used. To use LegacyFileWidget, please set UPLOADCARE["use_legacy_widget"] to True

Added

  • Added Python 3.12 and Django 5.0 to the test matrix.

Changed

  • Updated dependencies: httpx, pydantic, pytz, typing-extensions.
  • Updated development dependencies: mypy, pytest, black, isort, flake8, flake8-print, vcrpy, yarl, coverage, pytest-cov, sphinx, sphinx-argparse, types-*. Replaced pytest-freezegun with pytest-freezer.

Version 4.3.0

24 Dec 20:26
a897f59
Compare
Choose a tag to compare

Fixed

  • For AkamaiSecureUrlBuilderWithAclToken and AkamaiSecureUrlBuilderWithUrlToken:
    • Special characters that were not previously escaped are now properly handled, as detailed in issue #275.

Changed

  • For AkamaiSecureUrlBuilderWithAclToken and AkamaiSecureUrlBuilderWithUrlToken:
    • Both classes have been made more consistent and now accept a full URL, URL path, or just the UUID of a file – whichever is more convenient for you.

Deprecated

  • For FileGroup:

    • Added a deprecation warning when accessing datetime_stored property, as it has been deprecated in the REST API. This field does not exist in REST API v0.7.x.
  • For GroupsAPI:

    • Added a deprecation warning when calling store method, as it has been deprecated in the REST API. This API endpoint does not exist in REST API v0.7.x.

Version 4.2.2

20 Nov 18:16
f491abb
Compare
Choose a tag to compare

Added

  • For File:
    • AWS Rekognition Moderation results are now accessible via File.info["appdata"]["aws_rekognition_detect_moderation_labels"].

Version 4.2.1

17 Nov 10:47
ac26ce4
Compare
Choose a tag to compare

Fixed

  • For AddonsAPI:
    • In version 4.2.0, passing a Python dictionary as params to the execute method would cause an AttributeError. Now, you can use either an AddonExecutionParams instance or a dict. #272

Version 4.2.0

16 Nov 20:12
c897f7d
Compare
Choose a tag to compare

Summary of this update:

  1. Added support for the save_in_group parameter in multipage conversion (#258);
  2. Implemented the AWS Rekognition Moderation addon API (#260);
  3. Added signed_uploads setting for Django projects (#262);
  4. Secure URL generation improvements (#263 & #264);
  5. Various bug fixes.

There are no breaking changes in this release.

Added

  • For Uploadcare:

    • Added a type for the event parameter of the create_webhook and update_webhook methods.
    • Added the generate_upload_signature method. This shortcut could be useful for signed uploads from your website's frontend, where the signature needs to be passed outside of your website's Python part (e.g., for the uploading widget).
    • Added generate_secure_url_token method. Similar to generate_secure_url, it returns only a token, not the full URL.
    • Added an optional wildcard parameter to the generate_secure_url method.
  • For File:

    • Added the save_in_group parameter to the convert and convert_document methods. It defaults to False. When set to True, multi-page documents will additionally be saved as a file group.
    • Added the get_converted_document_group method. It returns a FileGroup instance for converted multi-page documents.
  • For DocumentConvertAPI:

  • For AddonsAPI / AddonLabels:

  • For Django integration:

    • Added the signed_uploads setting for Django projects. When enabled, this setting exposes the generated signature to the uploading widget.
  • For AkamaiSecureUrlBuilderWithAclToken:

    • Added get_token method.
    • Added an optional wildcard parameter to the build method.
  • Introduced AkamaiSecureUrlBuilderWithUrlToken class.

Changed

  • AkamaiSecureUrlBuilder has been renamed to AkamaiSecureUrlBuilderWithAclToken. It is still available under the old name and works as before, but it will issue a deprecation warning when used.

Fixed

  • For AddonsAPI / AddonExecutionParams:
    • Fixed an issue where calling execute and status with AddonLabels's attributes (such as AddonLabels.REMOVE_BG) for the addon_name would result in a 404 Not Found error.
    • Fixed ValidationError when constructing AddonClamAVExecutionParams or AddonRemoveBGExecutionParams with omitted optional parameters.

Version 4.1.3

05 Oct 16:27
b6c127e
Compare
Choose a tag to compare

Added

  • For AudioStreamInfo:
    • added profile field.

Changed

  • pyuploadcare now officially supports Python 3.12 (please notice that if you're using Django, that doesn't support Python 3.12 as of yet).

Version 4.1.2

08 Sep 13:48
595cebf
Compare
Choose a tag to compare

Fixed

  • Incorrect expiration time was calculated for signed uploads causing the AuthenticationError: Expired signature exception.