B4J Question [ABMaterial] PageNeedsUpload not working

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi,

1. I have put a ABMUpload in the ABMPage. but the list of PageNeedsUpload is all "false" !?
2. How much job(config) to do when i use ABMUpload ?


B4X:
public Sub AddPage(page As ABMPage)
    Pages.Add(page.Name)  
    PageNeedsUpload.Add(ABM.WritePageToDisk(page, File.DirApp & "/www/" & ABMShared.AppName & "/" & page.Name & "/", page.PageHTMLName, ABMShared.NeedsAuthorization))
End Sub

public Sub StartServer(srvr As Server, srvrName As String, srvrPort As Int)      
    ABM.WriteAppLauchPageToDisk(AppPage, File.DirApp & "/www/" & ABMShared.AppName, "index.html", ABMShared.NeedsAuthorization)

    ' start the server
    srvr.Initialize(srvrName)

    srvr.AddFilter("/js/b4j_ws.min.js", "ABMSessionCreator", False)
    srvr.AddWebSocket("/ws/" & ABMShared.AppName, "ABMApplication")
    For i =0 To Pages.Size - 1
        srvr.AddWebSocket("/ws/" & ABMShared.AppName & "/" & Pages.Get(i) , Pages.Get(i))
        If PageNeedsUpload.Get(i) Then          
            srvr.AddHandler("/" & ABMShared.AppName & "/" & Pages.Get(i) & "/abmuploadhandler", "ABMUploadHandler", False)
        End If
    Next  
    srvr.AddBackgroundWorker("ABMCacheScavenger")
    srvr.Port = srvrPort
 
Last edited:

jinyistudio

Well-Known Member
Licensed User
Longtime User
Yestoday, I try put ABMUpload in buildpage,It's OK but i cann't put it in connecpage !
 
Upvote 0
Top