Mulitple FileStorageTypes

Last post 01-31-2012, 6:31 AM by Kenneth. 7 replies.
Sort Posts: Previous Next
  •  01-18-2012, 8:03 AM 72739

    Mulitple FileStorageTypes

    Based on the SQL Server sample, a custom storage provider can be assigned to the Editor1.Setting["CuteEditorFileStorageType"] property.   My focus was on uploading PDFs and this works fine.  However, I guess I didn't anticipate that this would apply to all uploads - like images or movies.  I tried the images upload button and found the custom storeage class being invoked.  Is it possible to have different storage sources for different data types?  For example, assign a custom storage for documents and a file system based storage for images (in this case the default storage type).   One thought I have is handling the click event for a button and do the custom storage assignment there instead of as the SQL sample does on the Page Load event.  Are button click events available to program?
     
    Thanks,
    Steve Kumbsky
  •  01-18-2012, 1:29 PM 72741 in reply to 72739

    Re: Mulitple FileStorageTypes

    Hi kumbsky,
     
    CuteEditorFileStorageType is the global setting, you can set the dialog separate, like below(only for flash dialog)
     
    Editor1.Setting["InsertFlash-CuteEditorFileStorageType"] = typeof(SqlFileStorage).AssemblyQualifiedName; 
     
    If you did not set the global setting, you should set the store path for the flash dialog above
     
    Editor1.SetSecurityFlashGalleryPath("/");
     
    Regards,
     
    Ken
  •  01-20-2012, 8:19 AM 72766 in reply to 72741

    Re: Mulitple FileStorageTypes

    Ken,
     
    Thanks for the reply, this is good news.  So, next question is what are the setting values for the other types of objects?  Would the following be valid:
     
    Editor1.Setting["InsertDocuemnt-CuteEditorFileStorageType"]
    Editor1.Setting["InsertImage-CuteEditorFileStorageType"]
     
    Also I'm unclear on your last suggestion.  Are you saying that if I set the global setting ( Editor1.Setting["CuteEditorFileStorageType"]  ), I can override that by setting the store path as you suggest.  That is Editor1.SetSecurityFlashGalleryPath("/") will allow for file based storage.
     
    Thanks,
    Steve Kumbsky
  •  01-20-2012, 12:41 PM 72769 in reply to 72766

    Re: Mulitple FileStorageTypes

    Hi kumbsky,
     
    1. The other settings are 
     
    Editor1.Setting["InsertImage-CuteEditorFileStorageType"];
    Editor1.Setting["ImageGalleryByBrowsing-CuteEditorFileStorageType"];
    Editor1.Setting["InsertDocuemnt-CuteEditorFileStorageType"];
    Editor1.Setting["InsertMedia-CuteEditorFileStorageType"];
     
     
    2. What I mean is if your use the flash dialog to use the sql store/load the file, then you must set the  path for the flash dialog too.
     
    For example,
     
    if you set
     
    Editor1.Setting["InsertFlash-CuteEditorFileStorageType"] = typeof(SqlFileStorage).AssemblyQualifiedName;   
     
    Then must set  
     
    Editor1.SetSecurityFlashGalleryPath("/");
     
    If you set  
     
    Editor1.Setting["InsertDocument-CuteEditorFileStorageType"] = typeof(SqlFileStorage).AssemblyQualifiedName;   
     
    Then must set  
     
    Editor1.SetSecurityDocumentGalleryPath("/");
     
     
    3. Editor1.SetSecurityGalleryPath("/"); is the global setting for all dialogs. If you want to set the dialog store type separate, then do not use this setting, need to set the path separate like above.
     
    Regards,
     
    Ken 
     
     
     
  •  01-20-2012, 12:47 PM 72770 in reply to 72769

    Re: Mulitple FileStorageTypes

    Ken,
     
    Excellent!  Thanks so much for your help.
     
    Steve
  •  01-30-2012, 8:59 AM 72872 in reply to 72770

    Re: Mulitple FileStorageTypes

    Ken,
     
    Bad news, I just went to code based on your suggestions and there does not seem to be a CuteEditor.Editor.SetSecurityDocumentGallery() method available on the CuteEditor.  There is a CuteEditor.Editor.SetSecurityFilesGalleryPath(String) method.  Is this the one to use for documents?
     
    Thanks,
    Steve
     
  •  01-30-2012, 8:59 AM 72873 in reply to 72770

    Re: Mulitple FileStorageTypes

    Ken,
     
    Bad news, I just went to code based on your suggestions and there does not seem to be a CuteEditor.Editor.SetSecurityDocumentGallery() method available on the CuteEditor.  There is a CuteEditor.Editor.SetSecurityFilesGalleryPath(String) method.  Is this the one to use for documents?
     
    Thanks,
    Steve
     
  •  01-31-2012, 6:31 AM 72881 in reply to 72873

    Re: Mulitple FileStorageTypes

    Hi kumbsky,
     
    Sorry, you are right, just check the document again.
     
    SetSecurityFilesGalleryPath
    Specifies the URL path of the Files Gallery
    SetSecurityFlashGalleryPath
    Specifies the URL path of the Flash Gallery
    SetSecurityGalleryPath
    Specifies the URL path of the Image Gallery, flash gallery, media gallery and files gallery
    SetSecurityImageBrowserPath
    Specifies the URL path of the Image Browser
    SetSecurityImageGalleryPath
    Specifies the URL path of the Image Gallery
     
    Regards,
     
    Ken 
View as RSS news feed in XML