Differences
This shows you the differences between two versions of the page.
|
frifinans:programming_filetransfers [2009/08/01 10:58] kj created |
frifinans:programming_filetransfers [2009/08/01 10:58] (current) kj |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| The really interresting part now takes place on the server. On the server, the PDF-file is first generated so it can be send. Next the server calls something like this to add the filetransfer: | The really interresting part now takes place on the server. On the server, the PDF-file is first generated so it can be send. Next the server calls something like this to add the filetransfer: | ||
| - | <? | ||
| $filetrans = $this->ff->getOb("filetransfers")->add(array( | $filetrans = $this->ff->getOb("filetransfers")->add(array( | ||
| "filename" => "somefile.pdf", | "filename" => "somefile.pdf", | ||
| Line 13: | Line 12: | ||
| ) | ) | ||
| ); | ); | ||
| - | ?> | ||
| This adds the filetransfer as a valid filetransfer. It is now possible to create a new FriFinansClient-object and initiate the transfer itself. Useually this is done in "ffclient/gui/win_filetransfer.php" and "ffclient/include/class_client_filetransfer.php". Normally the easiest way to make the filetransfer happen for the user, is to user the (ClientFileTransfer)$filetrans variable as the first parameter to the WinFileTransfer-window. Do it like this: | This adds the filetransfer as a valid filetransfer. It is now possible to create a new FriFinansClient-object and initiate the transfer itself. Useually this is done in "ffclient/gui/win_filetransfer.php" and "ffclient/include/class_client_filetransfer.php". Normally the easiest way to make the filetransfer happen for the user, is to user the (ClientFileTransfer)$filetrans variable as the first parameter to the WinFileTransfer-window. Do it like this: | ||
| - | <? | ||
| require_once("gui/win_filetransfer.php"); | require_once("gui/win_filetransfer.php"); | ||
| $win_filetransfer = new WinFileTransfer($filetrans); | $win_filetransfer = new WinFileTransfer($filetrans); | ||
| - | ?> | ||
| The user will then be prompted with where he wants to save it, and when to start. The window will then take care of the rest. | The user will then be prompted with where he wants to save it, and when to start. The window will then take care of the rest. | ||