I have a test file(test1.txt
) in my desktop.This is its content.
FilePrint[FileNameJoin[{$HomeDirectory, "Desktop", "test1.txt"}]]
(*
31.16 220.49774362741593
31.18 223.49849688143496
31.2 226.49924900492292
31.22 223.5
31.24 228.5
31.26 231.5
31.28 227.5
31.3 222.5
31.32 222.5
35.72 209.72984917230133
35.74 220.68588083509488
*)
I try to use Import
and Export
in CloudDeploy
.
CloudDeploy[
FormPage["fileAddress" ->
"String", (data = Import[#fileAddress, "Table"]; Sin[data];
Export[FileNameJoin[{$HomeDirectory, "Desktop", "test.txt"}],
data]) &], Permissions -> "Public"]
Of course this action will get a error.But I have to say this two function can help a lot in real life.So any method or workaround can do this?
Aim:
I want to create some CloudObject
which have some specific function to help my friends who have no mma
.I hope she upload test1.txt
,then get test.txt
in her local disk.Just by her browser.
CloudDeploy[FormFunction[{"data" -> "CSV"}, Print[#data] &]]
$\endgroup$ – ktm Sep 26 '16 at 17:44Import
in my case.BTW,have you summarize other format also can realize such similar function except"CSV"
.Would you put your comment as a answer?I think it give very useful information to my question.And any workaround forExport
? $\endgroup$ – yode Sep 26 '16 at 18:51