action_crawler.asp 828 B

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