Skip to content

Commit

Permalink
fix file copy (#189)
Browse files Browse the repository at this point in the history
* fixed building cdn path for file copy
  • Loading branch information
art-vasilyev authored Oct 28, 2021
1 parent bf651ee commit eb484f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyuploadcare/resources/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ def __repr__(self):
def __str__(self):
return self.cdn_url

def set_effects(self, effects: Union[str, ImageTransformation]) -> None:
self.default_effects = str(effects)
def set_effects(
self, effects: Optional[Union[str, ImageTransformation]] = None
) -> None:
effects = str(effects) if effects else ""
self.default_effects = effects

def _build_effects(
self, effects: Optional[Union[str, ImageTransformation]] = None
):
effects = str(effects)

effects = str(effects) if effects else ""
if self.default_effects is not None:
effects = (
f"{self.default_effects}-/{effects}"
Expand Down

0 comments on commit eb484f6

Please sign in to comment.