一、改進圖片選擇界面
二、自定義文件的上傳路徑
在打開圖片上傳的對話框時,會看到以下兩句提示:
No property found for UserAction implementation, any user action will be disabled!
No property found for UserPathBuilder implementation! The 'DefaultUserFilesPath' will be used in the ConnectorServlet!
這兩個都是WORN級別的提示,一般情況下不會影響實際的應用。
要解決的話,第一句是說沒有找到實現UserAction這個接口的相關配置。在FCK中實際上已經實現了這個接口,在fckeditor.properties中加上一行connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
再次打開頁面,提示會變爲UserAction initialized to net.fckeditor.requestcycle.impl.UserActionImpl
第二句是說沒有沒有實現UserPathBuilder接口,將會使用默認的文件上傳路徑。默認的上傳路徑是放在WebContent/userfiles/image下。在多用戶的辦公系統裏,爲保證各用戶信息的獨立性和安全性,應該將不同用戶的上傳文件放在獨立的文件夾下面。在程序中加入如下代碼
在fckeditor.properties中加上connector.userPathBuilderImpl=net.fckeditor.requestcycle.impl.UserPathBuilderImpl
這樣就實現了上傳文件按用戶和時間進行分類。