Code Monkey home page Code Monkey logo

Comments (3)

robingenz avatar robingenz commented on September 14, 2024 2

Okay, got it. I can't modify the behavior of the Capacitor bridge but I can add a separate utils class, which can be directly used from every platform.

from capacitor-cloudinary.

robingenz avatar robingenz commented on September 14, 2024

Unfortunately, a Blob cannot be transferred via the native bridge. That's why the official Filesystem plugin supports only the type string for data (see here). There is an capacitor-blob-writer plugin, but it has potential security risks (see here). I recommend to convert Blobs to base64 and to use the official Capacitor filesystem plugin if a file cannot be created directly on the native file system.

For this reason i am closing this issue.

Please let me know if you have any other ideas for implementation. Then we can open the issue again.

from capacitor-cloudinary.

mesqueeb avatar mesqueeb commented on September 14, 2024

Hey @robingenz

I believe it can be helpful to not use the Swift integration at all in case a blob is passed. Meaning,whatever platform is used, if a blob is passed, the blob is uploaded via the web integration.

When passing a path, the file will be uploaded via swift/java.

There's no need to pass the blob to the native layer.

I do understand that it defeats the purpose of this plugin, but it's helpful because otherwise some apps will need to implement this plugin and implement their own uploading logic next to it just for when they need to save a blob from the WebView while using iOS/android.

from capacitor-cloudinary.

Related Issues (4)

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.