Re: Upload photo to database?

  •  02-03-2009, 2:16 AM

    Re: Upload photo to database?

    Web.config :
     
     <add key="UploaderDatabase" value="server=(local);database=UploaderSamples;uid=test;pwd=test"/>
     <add key="CuteWebUI.AjaxUploader.Provider" value="UploaderDatabaseProvider.UploaderSqlServerProvider,App_Code"/>
     
    Sql Schema:
     

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AjaxUploaderTempFiles]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[AjaxUploaderTempFiles]
    GO

    CREATE TABLE [dbo].[AjaxUploaderTempFiles] (
     [FileGuid] [uniqueidentifier] NOT NULL ,
     [FileTime] [datetime] NOT NULL ,
     [FileName] [nvarchar] (255)
     [FileSize] [int] NOT NULL ,
     [FileData] [image] NOT NULL ,
     [IsPersist] [bit] NOT NULL
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO

    ALTER TABLE [dbo].[AjaxUploaderTempFiles] WITH NOCHECK ADD
     CONSTRAINT [PK_AjaxUploaderTempFiles] PRIMARY KEY  CLUSTERED
     (
      [FileGuid]
     )  ON [PRIMARY]
    GO
     
     
     
     
     
View Complete Thread