Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error when specifying an asset folder for signed response object #825

Open
wireless25 opened this issue Jun 3, 2024 · 2 comments
Open
Labels
duplicate This issue or pull request already exists

Comments

@wireless25
Copy link

When using the JS client to request a signed response object to upload a file via management API, there is a type error when specifying an asset folder.


Expected Behavior

I expect to not get a type error in my IDE

Current Behavior

I get a type error

Steps to Reproduce

Following the documentation I set up a request to get a signed response object to upload a file via management API. When I specify an asset folder id, I get a type error in VS Code

const spaceId = '<SPACE_ID>'
const pat = '<PAT>'
const Storyblok = new StoryblokClient({
  oauthToken: pat,
})

await Storyblok.post(`spaces/${spaceId}}/assets`, {
  asset_folder_id: 123, // here is the type error "only specify known properties"
  filename: 'your_file.jpg',
  size: '640x359',
  validate_upload: 1,
})

type-error-sb-mapi

@wireless25
Copy link
Author

Hi there, any update on that issue? Is somebody else able to reproduce it?

@alvarosabu
Copy link
Contributor

alvarosabu commented Aug 21, 2024

duplicate of #528

@alvarosabu alvarosabu added the duplicate This issue or pull request already exists label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants