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

asset.createFromFiles doesn't work properly with plainObjects (or I couldn't figure it out) #1958

Open
3aluw opened this issue Sep 7, 2023 · 0 comments

Comments

@3aluw
Copy link

3aluw commented Sep 7, 2023

I tried the same example shown here but using the planiObject API:

scopedPlainClient.asset.createFromFiles(
{environmentId:"master"},
{
   fields: {
    title: {
      'en-US': 'Asset title'
    },
    description: {
      'en-US': 'Asset description'
    },
    file: {
      'en-US': {
        contentType: 'image/svg+xml',
        fileName: 'circle.svg',
        file: '<svg><path fill="red" d="M50 50h150v50H50z"/></svg>'
      }
    }
  }
})

but the svg doesn't get processed on contentful and it keep saying loading.

So is this a bug. or am I doing something wrong ?
@3aluw 3aluw changed the title createFromFiles doesn't work properly with plainObjects (or I couldn't figure it out) assete.createFromFiles doesn't work properly with plainObjects (or I couldn't figure it out) Sep 7, 2023
@3aluw 3aluw changed the title assete.createFromFiles doesn't work properly with plainObjects (or I couldn't figure it out) asset.createFromFiles doesn't work properly with plainObjects (or I couldn't figure it out) Sep 7, 2023
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

No branches or pull requests

1 participant