Project

General

Profile

Feature #19

Extending Servoy file plugin

Added by Patrick Talbot almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
High
Category:
core
Start date:
06/24/2010
Due date:
% Done:

100%

Estimated time:
Browser (if web client):

Description

1/ Adding streaming capabilities to the file plugin
as discussed on Servoy forum
http://www.servoy.com/forum/viewtopic.php?f=27&t=13968
and http://www.servoy.com/forum/viewtopic.php?f=54&t=14285

2/ Adding an appendToTXTFile method (requested by Marc Boegem)

3/ Adding mimeType support for web compatible write methods (requested by Jeff Bader)

A patch has been submitted to Servoy (attached here for reference), pending approval depends on the release of the "Transfer IP Waver" legal agreement...
Hopefully this document will be produced before 5.2 goes final.


Files

file.zip (22 KB) file.zip File plugin patch Patrick Talbot, 06/24/2010 05:46 AM
file.jar (53.8 KB) file.jar Patrick Talbot, 07/26/2010 07:09 AM

History

#1

Updated by Patrick Talbot almost 15 years ago

  • Status changed from New to In Progress
  • Priority changed from Normal to High
#2

Updated by Patrick Talbot almost 15 years ago

  • Category set to core
#3

Updated by Patrick Talbot almost 15 years ago

Added:
String[] getRemoteDirList(String path, boolean filesOnly) method
void streamFilesToServer(Object files, Object serverNames, Function callback)
void streamFilesFromServer(Object files, Object serverNames, Function callback)

- made sure to create subdirectory if they don't already exists.
- made sure that traversing up from the defaultFolder throws a SecurityException
- along with your authentication check, I have extracted it to securityCheck() method in FileServerPlugin
- finally I made sure that the process was not trying to read byte[] from a folder(!) with little results ;)
- corrected a problem with the close() method of ToFileTransferObject, which was not closing the correct Stream when used in streamFilesFromServer (as opposed to streamFilesToServer)
- reviewed the samples/tooltips/parameterNames/javadocs/comments.

patch send to Johan Companer.

#4

Updated by Patrick Talbot almost 15 years ago

  • % Done changed from 90 to 100

A lot more has been added since...

Basically a JSFile can now be a RemoteFile.
getRemoteList() will return JSFile[]
and convertToRemoteJSFile() will take a server path and return a usable JSFile on a server side file.
Loads of improvements around this all
+ security enhancements and emulation of practically all methods of JSFile to work on RemoteFile seamlessly.
+ docs updates and javadocs

#5

Updated by Patrick Talbot almost 15 years ago

  • Status changed from In Progress to Closed

Integrated in Servoy 5.2 - Revision r564

#6

Updated by Patrick Talbot almost 15 years ago

  • Status changed from Closed to Reopened
#7

Updated by Patrick Talbot almost 15 years ago

While working on a sample solution, a bug have been found in the convertToRemoteJSFile.
A patch has been sent to Johan Compagner.
Until a new release of the plugin is released, a corrected version can be found here (signed by me).

Also available in: Atom PDF