Skip to content

v0.7.0

Compare
Choose a tag to compare
@atinux atinux released this 27 Jun 14:35
· 135 commits to main since this release

compare changes

⚠️ Breaking Changes

We brought two breaking changes for hubBlob() for consistency (#187)

Custom Metadata

As we get the custom metadata in the customMetadata object, it makes sense to define them in the key as well.

Before:

hubBlob().put(file.name, file, {
  addRandomSuffix: true,
  hello: 'world'
})
/*
{
  contentType: 'image/jped',
  pathname: 'something-87652rfg.jpg',
  size: 154451,
  uploadedAt:  '2024-06-21T00:57:41.740Z',
  customMetadata: {
    hello: 'world'
  }
}
*/

After:

hubBlob().put(file.name, file, {
  addRandomSuffix: true,
  customMetadata: {
    hello: 'world'
  }
})
/*
{
  contentType: 'image/jped',
  pathname: 'something-87652rfg.jpg',
  size: 154451,
  uploadedAt:  '2024-06-21T00:57:41.740Z',
  customMetadata: {
    hello: 'world'
  }
}
*/

handleUpload

Before, we could give at the same level the options of put(), ensure() and handleUpload(), making it a bit confusing.

Now you need to set the options with the command prefix:

Before:

export default eventHandler(async (event) => {
  return hubBlob().handleUpload(event, {
    multiple: false,
    contentType: ['image/jpeg', 'images/png'],
    addRandomSuffix: true
  })
})

After:

export default eventHandler(async (event) => {
  return hubBlob().handleUpload(event, {
    multiple: false,
    ensure: {
      contentType: ['image/jpeg', 'images/png'],
    },
    put: {
      addRandomSuffix: true
    }
  })
})

Read the full documentation on https://hub.nuxt.com/docs/storage/blob

📖 Documentation

  • Add Hello Edge template (7c9e805)
  • Update og image (7ba4dba)
  • Improve ctas (099fcbd)
  • Try public sans font (05fcfea)
  • Add parent routes for header active links (47a7331)
  • Improve drizzle seed example (#176)
  • recipes: Remove extra field for drizzle seed (a8a8b01)

🏡 Chore

❤️ Contributors