views:

25

answers:

1

Hi,

I have one problem in a web server regarding the creation user folders and management. I have one page that users use to add the contents. During this add the user push one select button and add the content in one her folder like UserFolder/TheContent. I need to extend to use personalized folders using some item added by the user in the page and perform the creation of the personalised userfolder like Userfolder/uservalue_item/thecontent. My problem is that i need some ajax feature to pass the page uservalue_item to the add to folder feature. All samples are wellcome regarding creation and management of ticked userfolders and what to make if user quit without adding or validaing the page. Env : Windows based server, Asp.net,

Thanks, Romi

A: 

Well, the problem would be more easily solved in my opinion by emulating a file structure in your database. I'd have to look at your code to see how the user is uploading the data to the web server though. But I would use two seperate tables in a db with the following structure:

FoldersTable
{
    Id (Key),
    ParentFolderId (nullable if folder is root),
    UserId (ForeignKey, not nullable),
    FolderName 
}

ContentTable
{
    Id (Key),
    FolderId (foreign key to Foldertable),
    Content (binary blob field)
}

Furthermore, you could use two seperate functions: add_folder, and add_content. Extending that: remove_folder, move_folder, remove_content, etc.

I would not recommend you set it up exactly like that as I haven't taken time to analyze your current system requirements.

Hopefully I'm understanding your question correctly.

regex