Giter Site home page Giter Site logo

Comments (9)

nicolasgarnier avatar nicolasgarnier commented on May 24, 2024 2

Yes you are right, the rules are not correct, for them to work you need a userId in the path. See this file: https://github.com/firebase/friendlychat/blob/master/web/storage.rules

the second match line needs to be match /{userId}/{timestamp}/{fileName} { instead of match /{allPath=**} {

from codelab-friendlychat-web.

slotbite avatar slotbite commented on May 24, 2024

image api is down ... same problem

from codelab-friendlychat-web.

nicolasgarnier avatar nicolasgarnier commented on May 24, 2024
Image file name issue

You can upload images with any names, we only restrict by MIME type:

<input id="mediaCapture" type="file" accept="image/*,capture=camera">

Can you confirm that your File picker only lets you choose with files that start with image ? On which Browser/Os is this happening?

404 error

Can you double check that the storageBucket URL is not empty in your Firebase initialization snippet (the thing you copy paste from the Firebase Console)?
Can you also tell me on which Browser/OS this is happening?
Are there any errors before the 404 error in the console?

If you can consistently reproduce this could you upload your app? (Just run firebase deploy and give us the URL...)

from codelab-friendlychat-web.

nicolasgarnier avatar nicolasgarnier commented on May 24, 2024

@slotbite Could you tell em what you mean by "image api"? Give any details as you can please. Such as How to reproduce the issue. At which step o the codelab does this happens? etc...

from codelab-friendlychat-web.

slotbite avatar slotbite commented on May 24, 2024

0hn1chmdpt

The response
{ "error": { "code": 403, "message": "Unauthorized request." } }

code: "storage/unauthorized", message: "Firebase Storage: User does not have permission to…4096759791/5888042d60b337419a73da08dc073c24.jpg'.", serverResponse: "{↵ "error": {↵ "code": 403,↵ "message": "Unauthorized request."↵ }↵}", name: "FirebaseError"} code : "storage/unauthorized" message : "Firebase Storage: User does not have permission to access 'ckn3ZtFKWNWwzc4JXVWVveKlvuE2/1464096759791/5888042d60b337419a73da08dc073c24.jpg'." name : "FirebaseError" serverResponse : "{↵ "error": {↵ "code": 403,↵ "message": "Unauthorized request."↵ }↵}"

Yesterday I worked, I did not have any change, so I think there is a problem with the storage rules firebase
image

from codelab-friendlychat-web.

slotbite avatar slotbite commented on May 24, 2024

Cool! Thanks you

from codelab-friendlychat-web.

Vincent05 avatar Vincent05 commented on May 24, 2024

amazing, worked for me as well with a little variation:
match /{userId}/{postId}/{fileName} {

from codelab-friendlychat-web.

plthatfunkymusic avatar plthatfunkymusic commented on May 24, 2024

Had the same problem, and the solution was to stop / restart the server "firebase serve", whereas previously throughout the sample code I was only reloading the web-page. HTH

from codelab-friendlychat-web.

TuanMinPay avatar TuanMinPay commented on May 24, 2024

Cool! Thanks you

from codelab-friendlychat-web.

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.