on 2016 Jun 13 5:59 AM
Hi does somebody know, how create a file inside a SDK Component and write data in it.
In real Java i need binding two file before function.
Java.io.filewriter and Java.io.IOExeption
I hope somebody know the way to write a file in DS SDK Component
Thanks
Harry
Request clarification before answering.
Write a file where? To the server back-end or the user's PC?
It will be impossible to write to the server back-end without some server component runtime that could communicate via HTTP/REST/AJAX etc to handle requests for writes. I think this is what is referring to when mentioning Node or PHP would be for server-side writes.
If you mean writing to a user's PC, client-side JavaScript (which is basically what the Design Studio SDK is) cannot write to a PC's filesystem. However, you could invoke a file download dialog with just pure JavaScript. There are many Open Source libraries that make this a pretty simple job. I use a JS library called FileSaver to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harald,
Yes you can write.
jquery - Is it possible to write data to file using only JavaScript? - Stack Overflow
if you are ok with running some server in Node or PHP, you can use ajax from component to server to write file.
Thanks,
Nithyanandam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.