In what way can I read all the jpg files that are in a certain remote folder?
I think in this Sub you should do it
B4X:
Public Sub FindImages (root As String) As ResumableSub
Dim j As HttpJob
j.Initialize("", Me)
j.Download(root)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim str As String = j.GetString
Dim rb As RegexBuilder
rb.Initialize
rb.AppendEscaped("<img").Append(rb.CharAny).AppendZeroOrMore.AppendEscaped($"src=""$).StartCapture
rb.AppendAnyBut(Array($"""$)).AppendAtLeastOne.EndCapture.Append(rb.CharQuote)
Log(rb.Pattern)
Dim m As Matcher = Regex.Matcher2(rb.Pattern, Regex.MULTILINE, str)
Do While m.Find
Dim link As String = m.Group(1)
If link.StartsWith("http") = False Then
If link.StartsWith("/") = False Then link = "/" & link
link = root & link
End If
Main.urls.Add(link)
Loop
End If
j.Release
Return j.Success
End Sub
[QUOTE = "Peter Simpson, publicación: 605277, miembro: 21400"] Hmm, esto puede ser de alguna ayuda para usted. Con solo un pequeño cambio de código, debería hacer exactamente lo que está buscando ...
[MEDIA = vimeo] 255570732 [/ MEDIA] [/ QUOTE]
I have watched the 30 minutes and it has nothing to do with what I am requesting.
I just want to get a list of images from a remote folder
If you create a index.html with the names of your images (1.jpg, 10.jpg) and put the file in the folder, the code will read the images and show it in the slider.
If you create a index.html with the names of your images (1.jpg, 10.jpg) and put the file in the folder, the code will read the images and show it in the slider.