Code Monkey home page Code Monkey logo

Comments (7)

christophe-g avatar christophe-g commented on August 29, 2024 2

Still experiencing this when an uploaded file does not have an extension.

I am aware that I can check whether filename has an extension before uploading, but IMO the resize image extension should be able to handle case without file extension.

Can this be re-opened ?

image

from extensions.

Salakar avatar Salakar commented on August 29, 2024 1

Hey @emrebicer 👋 - thanks for reporting this issue, will get this looked at.

from extensions.

TheBestMoshe avatar TheBestMoshe commented on August 29, 2024 1

It seems like this bug only happens when the uploaded file doesn't have a file extension. When there is an extension (.jpg), or even a . at the end of the filename (random-filename.) then it works as expected. The resized image name is {original filename}_64x64.. It seems like the extension is expected and without it, something is getting messed up.

from extensions.

Salakar avatar Salakar commented on August 29, 2024 1

You can set a file extension when using putString by specifying a the file name when creating a storage reference:

const imageStorageRef = firebase.storage().ref('images/space.jpg');
// ...
imageStorageRef.putString(/* ... */) // ..

Is there some other case where it would never set a file extension?

from extensions.

laurenzlong avatar laurenzlong commented on August 29, 2024 1

Actually I see it's fixed in #134 :)

from extensions.

emrebicer avatar emrebicer commented on August 29, 2024

You can set a file extension when using putString by specifying a the file name when creating a storage reference:

const imageStorageRef = firebase.storage().ref('images/space.jpg');
// ...
imageStorageRef.putString(/* ... */) // ..

Is there some other case where it would never set a file extension?

After adding ".jpg" at the end of my file names the problem went away. It looks like a proper solution for me. Closing the issue, thank you :).

from extensions.

laurenzlong avatar laurenzlong commented on August 29, 2024

@Salakar We should support file names without file type extensions. Can you work on a PR to fix this?

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.