2

I have some difficulties with OpenTBS. I use it to load a template and permit the user to modify this template and save it on the server after modification.

When i use $TBS->Show(OPENTBS_DOWNLOAD,$file_name) it opens the file template but save it in a temp file (client side). But I would like to save it on the server instead.

If i use $TBS->Show(OPENTBS_FILE, $file_name) the file will be saved on the server but the modifications will not.

How to save the file on the server and give the possibility to the user to modify it directly on the server?

Amal Murali
  • 75,622
  • 18
  • 128
  • 150
Vens
  • 21
  • 3

1 Answers1

0

Your problem is an HTTP problem rather than an OpenTBS problem.

As I understand, you want to first download the result of the merged file from the server to the client, then let the user modifying the file, and then upload the modified file back from the client to the server.

Another solution would be to have an in-line file editor for your file type which I think it does not exists yet.

Command $TBS->Show(OPENTBS_DOWNLOAD,$file_name) let you download the result of the merge directly to the user without saving it to the server. No temporary file is used. Modifications of the template are stored in the PHP memory.

Command $TBS->Show(OPENTBS_FILE, $file_name) let you save the result of the merge to the server.

For the upload from the client to the server using HTTP, you can only use the command provided for this purpose, and which is managed by the HTML entity . For security reasons, the navigator won't let you use another way of doing it.

Skrol29
  • 5,402
  • 1
  • 20
  • 25