Code Monkey home page Code Monkey logo

Comments (4)

Gradecak avatar Gradecak commented on May 23, 2024 1

I ran into the same issue today, and after some investigation I believe I've discovered the cause.

The download process first resolves the blob to an object resource and then uses the mediaLink property to determine where to download the resource from.

Unfortunately, the mediaLink is constructed from the base_url of the server, which is usually 0.0.0.0 when running the emulator inside of docker-compose. Since docker containers in docker-compose are generally addressed via DNS, its likely that you have your STORAGE_EMULATOR_HOST set to the name of the service where the emulator is running.

This in turn means that when you try to download the blob in the container different from the one where the emulator is running, you end up making the download request to 0.0.0.0 rather than the hostname of the container where the emulator service is running.

I think a relatively straightforward solution to this might be to allow for a STORAGE_HOST environment variable that defaults to DEFAULT_HOST if not provided. The mediaLink can then be constructed from STORAGE_HOST allowing it to work inside of the docker network.

I'd be happy to set this up if PR's are welcome on the project?

from gcp-storage-emulator.

oittaa avatar oittaa commented on May 23, 2024

I don't use Docker Compose, so I don't really know what's going on. If you'll provide a minimal test case, I could try to reproduce it at some point.

from gcp-storage-emulator.

FAR5HID avatar FAR5HID commented on May 23, 2024

Ran into the same issue. Did you find anything later? @JeffryCA

from gcp-storage-emulator.

gabrieljoelc avatar gabrieljoelc commented on May 23, 2024

I was able to get things working with a combination of #82 (comment) and #82 (comment). looks like this works around the issue @Gradecak mentioned?

from gcp-storage-emulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.