UDATech / ConstructionOnlineBacklog

Work Items/Issue Management for COL
0 stars 0 forks source link

Redline Post Database.readFilesTable #41

Open swarduda1 opened 7 years ago

swarduda1 commented 7 years ago

@kinztechcom Is this used in Redline? We should get together and talk about the possibilities with AWS and see if there's potentially some ways for file storage to work easier for Redline.

Public Class RedLinePost
    Implements System.Web.IHttpHandler

    Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim response As New JObject()

        Dim project_id As Integer = My.Utility.cleanInteger(context.Request.Item("project_id"))
        Dim set_id As Integer = My.Utility.cleanInteger(context.Request.Item("set_id"))
        Dim creator_id As Integer = My.Utility.cleanInteger(context.Request.Item("creator_id"))
        Dim file_id As Integer = My.Utility.cleanInteger(context.Request.Item("file_id"))
        Dim db_id As Integer = My.Utility.cleanInteger(context.Request.Item("db_id"))
        Dim uuid As String = My.Utility.cleanString(context.Request.Item("uuid"))

        If file_id <> 0 And db_id <> 0 And project_id <> 0 And creator_id <> 0 Then
            Try

                Dim data As Byte()
                data = Database.readFilesTable(db_id, file_id) '**<-- that call**

                response = RedLineHandler.ProcessFile(data, file_id, project_id, set_id, creator_id, uuid)