If you were doing this outside of Ebase you could use something like
Code: Select all
input type="file" name="file[]" accept="image/*" />
And this would let the user only select images in the upload window of their browser. But in Ebase you'll have to change the line in UFSSetup.properties that says:
Ufs.uploadFileTypes=all
to something like:
Ufs.uploadFileTypes: doc,xls,ppt,pdf
This will limit the file types that will be accepted only after the user has clicked upload file. i.e if the user tries to upload an file that doesn't match Ufs.uploadFileTypes then an error message gets displayed.
Sample file upload script if you need it:
// sample upload script
// display the upload page...
form.uploadFileFromBrowser();
// Processing resumes here after the upload..
var fileName = system.variables.$FILE_NAME.value;
if (!fileName)
{
// Error message if the Cancel button has been pressed
event.owner.addErrorMessage("You must upload something");
}
else
{
// Show info message if file uploaded successfully
event.owner.addWarningMessage(1013, [fileName]);
fields.CV_FILE_NAME.value = fileName;
}
// end of upload script
Message 1013 has the text: File && uploaded successfully
Im kinda new to Ebase as well but i've just done the 4 day course which has helped a huge amount.
Luke