Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

zplata
Copy link
Collaborator

@zplata zplata commented Apr 18, 2025

Adds a helper method that allows for one API call on a currently two-step process for uploading assets to Webflow:

  1. Create Asset Metadata with Webflow to get S3 upload URL
  2. Upload the asset to S3

Returns the same response from the [Create Asset Metadata](https://developers.webflow.com/data/reference/assets/assets/create API endpoint

Example usage:

    // Where wf is the Webflow SDK client
    const res = await wf.assets.utilities.createAndUpload(siteId, {
        fileName: "13_unsplash.jpeg",
        file: "https://fastly.picsum.photos/id/237/200/300.jpg",
    });

@zplata zplata requested a review from KeithRyanWong April 18, 2025 01:57
src/wrapper/AssetsUtilitiesClient.ts Outdated Show resolved Hide resolved
src/wrapper/AssetsUtilitiesClient.ts Outdated Show resolved Hide resolved
src/wrapper/AssetsUtilitiesClient.ts Outdated Show resolved Hide resolved
src/wrapper/AssetsUtilitiesClient.ts Outdated Show resolved Hide resolved
src/wrapper/AssetsUtilitiesClient.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@KeithRyanWong KeithRyanWong left a comment

Choose a reason for hiding this comment

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

Thanks for updating!

@zplata zplata merged commit 750b4c9 into master Apr 30, 2025
6 checks passed
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.