Comments (6)
Well, I guess it's possible with the query string but it's impractical
from canvas-sketch.
I think we can make a skateboard solution by adding copy/paste functionality. Thoughts?
https://news.ycombinator.com/item?id=17653339
from canvas-sketch.
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.
Here are the possibilities that come to mind:
- Copy/Paste JSON or YAML in a way similar to SVGOMG's feature
- Pass in canvas data directly through the URL
- Pass a URL to a json/yml file as a query string, and download via ajax (better for sharing, worse for security)
- Add a way to open a canvas from the page either by entering in a URL or file drag and drop
- Create a canvas hosting service (annoying for maintenance, and I have to store people's data)
- Works great, not convenient for sharing
- Super long URLs have limits
- May cause people to inadvertently expose their business model to the public
- Works great for desktop, not convenient for sharing or for mobile devices
- 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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canvas-sketch.