cancel
Showing results for 
Search instead for 
Did you mean: 

SDK Component create file and write data

hs1
Participant
0 Kudos
92

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

View Entire Topic
mike_howles4
Active Contributor
0 Kudos

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.