CustomFileProvider and separating one user's images from another

Last post 07-10-2006, 7:34 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  07-09-2006, 3:21 PM 20828

    CustomFileProvider and separating one user's images from another

    Hi,
     
    We used to tell Cute Editor's Image Uploader to store images in contextually-generated sub folder paths so that User A's images are not visible to User B. This is possible thanks to Cute Editor's SetSecurityGalleryPath and friends.
     
    We are making a switch to DB-storage of these same images. Thanks to the CustomFileProvider we know how to get started, but we are now at a bit of a loss as to what to do to separate users images.
     
    Because the CustomFileProvider just assigns SetSecurityGalleryPath to "/". How can we still allow User A his/hre private folder and User B his/her different private folder?
     
    Please kindly help,
     
    Thank you!
     
    Best regards,
    -- David
     
    P.S. I have tried SetSecurityGalleryPath to an unique folder name (per user) and that didn't work at all.
     
    P.P.S. I have also tried to add an additional field in the backend fsitems table to track permissions and ownership, but that still has the problem of User A not being able to upload the same named file as User B because of the unique key constrain on the path field. Maybe I can play with the uniqueness constraints?
  •  07-10-2006, 7:34 PM 20875 in reply to 20828

    Re: CustomFileProvider and separating one user's images from another

    David,
     
    You just need to set different gallery path:
     
    private void Page_Load(object sender, System.EventArgs e)
      {
       Editor1.Setting["CuteEditorFileStorageType"]=typeof(SqlFileStorage).AssemblyQualifiedName;
       Editor1.Setting["DownFile"]=ResolveUrl("DownFile.Aspx");
       Editor1.SetSecurityGalleryPath("/test1");
     }
     
    If you want to have different folder for flash, image, media and file.
     
       Editor1.SetSecurityImageGalleryPath(path1);
       Editor1.SetSecurityMediaGalleryPath(path2);
       Editor1.SetSecurityFlashGalleryPath(path3);
       Editor1.SetSecurityFilesGalleryPath(path4);
       Editor1.SetSecurityTemplateGalleryPath(path5);
     
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML