Code Monkey home page Code Monkey logo

Comments (6)

piotr-yuxuan avatar piotr-yuxuan commented on May 27, 2024

Well, I guess it's possible with the query string but it's impractical

from canvas-sketch.

sbussard avatar sbussard commented on May 27, 2024

I think we can make a skateboard solution by adding copy/paste functionality. Thoughts?
https://news.ycombinator.com/item?id=17653339

from canvas-sketch.

webbertakken avatar webbertakken commented on May 27, 2024

JSON would work, but it's still a hassle and unpractical for non-developers (likely there will be some, given the nature of the app). Unless you save them to a file with some extension that you can then open with the application.

Perhaps store it in mongo and generate a unique link. The only downside is that it is an extra step in the setup. And you wouldn't be able to host it as a docs anymore.

from canvas-sketch.

sbussard avatar sbussard commented on May 27, 2024

Here are the possibilities that come to mind:

  1. Copy/Paste JSON or YAML in a way similar to SVGOMG's feature
  2. Pass in canvas data directly through the URL
  3. Pass a URL to a json/yml file as a query string, and download via ajax (better for sharing, worse for security)
  4. Add a way to open a canvas from the page either by entering in a URL or file drag and drop
  5. Create a canvas hosting service (annoying for maintenance, and I have to store people's data)

  1. Works great, not convenient for sharing
  2. Super long URLs have limits
  3. May cause people to inadvertently expose their business model to the public
  4. Works great for desktop, not convenient for sharing or for mobile devices
  5. Not really an option because of the following reasons:
  • People need 100% confidence that their business secrets are not being spied on by humans, machine learning algorithms, or advertising algorithms (opinion)
  • The app isn't monetized so there's no business-case for maintaining a hosting platform (principle)

from canvas-sketch.

IJustDev avatar IJustDev commented on May 27, 2024

How about using pastebin/hastebin for this purpose?

One can simple click the share button and his data would be uploaded to hastebin and we just pass through the generated url.

We could then implement a endpoint like /view/<hastebin-hash>. The app would then check hastebins code of that hash and if it contains a special field (like BUSINESS_CANVAS_VERSION) we can be sure it's a valid canvas.

If there are errors in the paste we would just throw an exception telling him, it's invalid.

What do you think?

from canvas-sketch.

IJustDev avatar IJustDev commented on May 27, 2024

Okay so I've tried this approach and wondered why I can't upload anything to hastebin from within canvas-sketch. Seems like they don't support CORS yet.

So I've made a pull request for this problem. If it gets implemented we can continue using this approach and would have a free hosting for the business plans.

Refs:
toptal/haste-server#353

from canvas-sketch.

Related Issues (10)

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.