Custom integration

To integrate Roxy Fileman into your CMS or any other web application edit javascript file located in fileman/js/custom.js and fill the function "FileSelected()". This function has one argument - object containing following properties:  

fullPath - path to the file - absolute from your site root.

path - directory in which the file is located - absolute from your site root.

size - size of the file in bytes.

time - timestamp of last modification.

name - file name.

ext - file extension.

width - if the file is image, this will be the width of the original image, 0 otherwise.

height - if the file is image, this will be the height of the original image, 0 otherwise.

Example:

function FileSelected(file){
  // Set the value of field sent to Fileman via URL param "field".
  opener.document.getElementById(RoxyUtils.GetUrlParam('field')).value = file.fullPath;
  // Set the source of an image which id is sent to Fileman via URL param "img".
  opener.document.getElementById(RoxyUtils.GetUrlParam('img')).src = file.fullPath;
  // Close file manager if it's opened in separate window. 
  self.close();
  // Close file manager if it's opened in JQuery dialog.
  $(opener.document).find('#dialog_element_id').dialog('close'); 
}


Working example

You need JQuery and JQuery UI libraries to run this example! See http://jqueryui.com for usage details. 

Click the image below to select another one.
View source

Click on the text field below to select a file.

View source