Skip to content

Conversation

@DavidCramer
Copy link
Contributor

A public ID cannot start with a forward slash.
If the folder is set to none, it defaults to / Previously, this was not an issue since we didn't build the folder/public_id structure dynamically. But now, since it is, a root folder asset will start with /. i.e /public-id-jpg

This fix simply applies a ltrim( $public_id, '/' ) when combining the folder and id.

An additional fix is that if auto-upload is disabled, assets that go out of sync, (changing the folder, or cloudname, etc...) it will show as unsynced. This is because there is a check to see if auto sync is on before uploading. I've added a check to see if it's off unless it's been synced before. if it has, it enables it for just that asset.

@DavidCramer DavidCramer requested a review from pereirinha July 1, 2020 10:51
Copy link
Contributor

@pereirinha pereirinha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@pereirinha pereirinha merged commit 735c00c into develop Jul 1, 2020
@pereirinha pereirinha deleted the fix/ltrim-forward-slash branch July 1, 2020 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants