Git Product home page Git Product logo

Comments (2)

eexit avatar eexit commented on June 6, 2024

Hey @anuragkumar19,

A good start would be "Hello".

This storage adapter has been out there since pre-version 1 of Ghost and according to my research, it's not been a year since Ghost allows any file types to be uploaded. It takes time to track all Ghost features 😉

It seems like Cloudinary allows to upload any kind of file, which is excellent. Now, we only need to implement and test this.

Want to contribute?

Thanks!

from ghost-storage-cloudinary.

anuragkumar19 avatar anuragkumar19 commented on June 6, 2024

Hi! @eexit
I was trying to find a way to do it. After a bit of reasearch I found that we can do that very easily with little bit of change.

"storage": {
        "active": "LocalImagesStorage",
        "media": "LocalMediaStorage",
        "files": "LocalFilesStorage",
        "LocalMediaStorage": {},
        "LocalFilesStorage": {}
    },

Source: https://github.com/TryGhost/Ghost/blob/fa1861aad3ba4e5e1797cec346f775c5931ca856/ghost/core/core/shared/config/defaults.json

They use key:-active for image adapter which didn't hint me at first that there exist other configuration otions like media,files which I can configure to make my work done. But going through the files led me this.

We have to write two more files one for files and one for media and rename the index file. Now we have to move dirctly in content/storage/adapter instead of content/adapters/storage/ghost-storage-cloudinary. As these are major changes and break the other application running. We have to release a new major version.

CloudinaryImagesStorage.js
CloudinaryMediaStorage.js
CloudinaryFilesStorage.js

New conf:

"storage": {
        "active": "CloudinaryImagesStorage",
        "media": "CloudinaryMediaStorage",
        "files": "CloudinaryFilesStorage",
        "CloudinaryMediaStorage": {},
        "CloudinaryFilesStorage": {},
        "CloudinaryImagesStorage": {},
    },

We have another option to create two other library one for media and one for files. It will not break the other application and people who want to use this feature just add that libraries.

Waiting for your opinion on this.

Thanks!

from ghost-storage-cloudinary.

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.