Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prezly/uploadcare
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.3
Choose a base ref
...
head repository: prezly/uploadcare
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.4.4
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 15, 2024

  1. Always apply the inline parameter to downloadUrl

    kudlajz committed Apr 15, 2024
    Copy the full SHA
    2aaac87 View commit details
  2. Merge pull request #11 from prezly/feature/care-4715-download-image-o…

    …ption-in-academy-gives-you-a-weird-document
    
    [CARE-4715] Fix - Always apply the inline parameter to downloadUrl
    kudlajz authored Apr 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0556b86 View commit details
  3. 2.4.4

    kudlajz committed Apr 15, 2024
    Copy the full SHA
    75f3937 View commit details
Showing with 2 additions and 7 deletions.
  1. +1 −1 package.json
  2. +1 −6 src/lib/UploadcareImage.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prezly/uploadcare",
"version": "2.4.3",
"version": "2.4.4",
"description": "Uploadcare utilities used at Prezly",
"license": "MIT",
"type": "module",
7 changes: 1 addition & 6 deletions src/lib/UploadcareImage.ts
Original file line number Diff line number Diff line change
@@ -140,12 +140,7 @@ export class UploadcareImage {
const downloadUrl = [
UPLOADCARE_CDN_URL,
this.uuid,
// Prepend a dash only if effects exist.
// It doesn't matter if there's a dash at the end of URL even if there are no effects,
// but it looks cleaner without it.
this.effects.length === 0
? this.effects
: ['', ...this.effects, '/inline/no/'].join('-'),
['', ...this.effects, '/inline/no/'].join('-'),
].join('/');

return `${downloadUrl}${encodeURIComponent(this.filename)}`;