Code Monkey home page Code Monkey logo

Comments (5)

thatfiredev avatar thatfiredev commented on August 29, 2024

Sounds like a dupe of #18

from extensions.

 avatar commented on August 29, 2024

Sounds like a dupe of #18

#18 talks about defining a 'custom' bucket, implying something non-standard. The source for the extension has a regex filter for the bucket name requiring a string of text with a least 2 .s with strings around them i.e.

 - param: IMG_BUCKET
    type: string
    label: Cloud Storage bucket for images
    description: >
      To which Cloud Storage bucket will you upload images that you want to resize?
      This bucket will store both the original and resized images.
    default: ${STORAGE_BUCKET}
    validationRegex: (.)+\.(.)+\.(.)+
    validationErrorMessage: Invalid storage bucket
    example: my-project-12345.appspot.com
    required: true

which is what is restricting entered values to something like the example value, but also allows anything else with 2 .s in, like a bucket URL such as in the example in the response by @Salakar or something like an IP address or even 'this.is.silly'

#18 talks about the issue that when you enter something incorrectly, it doesn't work. That's not an issue. Their expected result is 'It should use the defined bucket', but then they are giving an example not using a valid bucket name and showing that that doesn't work - this doesn't demonstrate what the actual issue is, though it is a good demonstration of the wasted time it causes people to spend trying to find workarounds by not accepting valid bucket names.

It should not be expected that it uses whatever you define (since that might not be a bucket, as they demonstrate entering a value which is not a bucket), it should be expected that it accepts all and only valid bucket names, not just any value in the form [string].[string].[string]

My issue is that you can't enter something which would be correct.

P.S. Sorry I missed that issue, I think I dismissed it subconsciously because it is tagged as a bug and I didn't consider it a bug, as it seems very intentionally restricted to such values. If you could enter a bucket from the firebase storage console, and then it didn't work, that would be a bug in my eyes.

from extensions.

laurenzlong avatar laurenzlong commented on August 29, 2024

This is indeed a bug, since a valid storage bucket does not need to have any dots in it. For example, I can create a bucket called "my-bucket" on Cloud Console. That would be a valid bucket, but it would fail the regex validation. These are the guidelines for what a valid bucket name is: https://cloud.google.com/storage/docs/naming. It'll probably be too hard to have a regex to checks all of these conditions, nor would it be super helpful, since it still won't know whether the bucket in fact exists. I'm thinking that maybe the regex can simply check that the bucket name only contains valid characters (dots, dashes, underscores, letters, numbers). If the bucket doesn't actually exist, then the Extension will fail to install, and a detailed error message will show up which explains the bucket doesn't exist.

from extensions.

mapkbalaji avatar mapkbalaji commented on August 29, 2024

Is there any progress to this bug? I couldn't choose a source from a different bucket. As of now, is there an option to choose a source from a directory from the default bucket?

from extensions.

laurenzlong avatar laurenzlong commented on August 29, 2024

@Ehesp @Salakar is this something you can make a pull request for? Thanks!

from extensions.

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.