question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blob method does not exist in the result

See original GitHub issue

How can I return the result in blob? It seems that .blob() does not exist

- Operating System: `Darwin`
- Node Version:     `v16.13.1`
- Nuxt Version:     `3.0.0-27319101.3e82f0f`
- Package Manager:  `npm@8.1.2`
- Bundler:          `Vite`
- User Config:      `css`, `watch`, `build`
- Runtime Modules:  `-`
- Build Modules:    `-`
const {data: banners, refresh: bannersFetcher} = await useAsyncData(
    'banners',
    async () => {
      const banners = await $fetch('/api/mc/banners')
        .then((data) => {
          return Promise.all(_.map(data, async (banner) => {
            const blob = await $fetch(banner.data).then(res => res.blob())
            console.log('Hey', blob)
          }))
        })
      // console.log(banners)
      return []
    }
)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Dec 14, 2021
1reaction
danielroecommented, Dec 14, 2021

@frbuceta Apart from Blob support in ohmyfetch, the issue you were experiencing is solved if you return a value from map.

Example.

<template>
  <pre>
    {{ banners }}
  </pre>
</template>

<script setup>
import _ from "lodash";

// eslint-disable-next-line
const { data: banners, refresh: bannersFetcher } = await useAsyncData(
  "banners",
  async () => {
    const banners = await $fetch("/api/banners").then((data) => {
      return Promise.all(
        _.map(data, async (banner) => {
          // const blob = await $fetch.raw(banner.data).then((res) => res.blob());
          const blob = await fetch(banner.data).then((r) => r.blob());
          console.log(blob);
+          return blob;
        })
      );
    });
    console.log(banners);
+    return banners;
  }
);
</script>
Read more comments on GitHub >

github_iconTop Results From Across the Web

I have a custom object. I want to add a blob file in a POST ...
The error when i execute in anonymous window is Method does not exist or incorrect signature: void POST() from the type.
Read more >
The specified blob does not exist - Shows in azure browser
The specified blob does not exist - Shows in azure browser - but when I click download does not exist. Save this question....
Read more >
Decoding Blob method for the contentversion object through ...
I Developed Rest class as like below.If i run this i am able to get pdf on browser but pdf was not decoding...
Read more >
The specified blob does not exist - Robert Greiner
The easiest way around this issue is to make sure the baseAddress property in the CloudBlobClient object starts with https. You should be...
Read more >
BlobClientBase Class | Microsoft Learn
This class provides a client that contains all operations that apply to any blob type. This client offers the ability to download blobs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found