puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!--#include file="ASPJson.class.asp"-->
<!--#include file="config_loader.asp"-->
<!--#include file="Uploader.class.asp"-->
<%    
 
    Set up = new Uploader    
    up.MaxSize = config.Item("catcherMaxSize")
    up.AllowType = config.Item("catcherAllowFiles")
    up.PathFormat = config.Item("catcherPathFormat")
 
    urls = Split(Request.Item("source[]"), ", ")
    Set list = new ASPJson.Collection
 
    For i = 0 To UBound(urls)
        up.UploadRemote( urls(i) )
        Dim instance
        Set instance = new ASPJson.Collection
        instance.Add "state", up.State
        instance.Add "url", up.FilePath
        instance.Add "source", urls(i)
        list.Add i, instance
    Next
 
    Set json = new ASPJson
 
    With json.data
        .Add "state", "SUCCESS"
        .Add "list", list
    End With
 
    json.PrintJson()
%>