It works perfectly with Classic ASP.
Here is upload_conf.asp
[code]<%@ EnableSessionState=False Language=VBScript%>
<% Option Explicit %>
<%
Response.ExpiresAbsolute=#July 7,2001 12:00:00#
Response.AddHeader “Pragma”, “no-cache”
Response.AddHeader “cache-control”,“no-store”
Response.AddHeader “Access-Control-Allow-Origin”,"*"
Response.AddHeader “Access-Control-Expose-Headers”,“server-name,translateorigin”
Response.AddHeader “x-content-type-options”, “nosniff”
Response.AddHeader “x-frame-options”, “SAMEORIGIN”
Response.AddHeader “x-xss-protection”, “0”
Response.Buffer = True
Response.ContentType = “application/json”
Response.Charset=“UTF-8”
Response.CodePage = 65001
Dim url
url = “http://localhost/dhtmlxVault23/samples/dhtmlxVault/server/upload_handler.asp”
Response.Write “{”
Response.Write “parent: ““vaultObj””,” // container for init, common for all demos
Response.Write “uploadUrl: “”” & url & “”"," // html4/html5 upload url
Response.Write “swfUrl: “”” & url & “”"," // flash upload url
Response.Write “slUrl: “”” & url & “”"," // silverlight upload url, FULL path required
Response.Write “swfPath: ““dhxvault.swf””,” // path to flash uploader
Response.Write “slXap: ““dhxvault.xap””” // path to silverlight uploader
Response.Write “}”
%>[/code]
and here is upload_handler.asp
(you need to download and include freeaspupload.asp)
[code]<%@ EnableSessionState=False Language=VBScript%>
<% Option Explicit %>
<%
Response.ExpiresAbsolute=#July 7,2001 12:00:00#
Response.AddHeader “Pragma”, “no-cache”
Response.AddHeader “cache-control”,“no-store”
Response.AddHeader “Access-Control-Allow-Origin”,"*"
Response.AddHeader “Access-Control-Expose-Headers”,“server-name,translateorigin”
Response.AddHeader “x-content-type-options”, “nosniff”
Response.AddHeader “x-frame-options”, “SAMEORIGIN”
Response.AddHeader “x-xss-protection”, “0”
Response.Buffer = True
Response.ContentType = “application/json”
Response.Charset=“UTF-8”
Response.CodePage = 65001
Dim uploadsDirVar
uploadsDirVar = Server.MapPath(“uploaded”)
’ Max filesize request */
If Request(“mode”) = “conf” Then
Response.Write("{maxFileSize: ““700000"”}”)
Response.End
End If
Response.Write SaveFiles()
Response.End
Function SaveFiles
Dim Upload, fileName, fileSize, ks, i, fileKey
SaveFiles = "{state: false}"
Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)
ks = Upload.UploadedFiles.keys
if (UBound(ks) <> -1) then
for each fileKey in Upload.UploadedFiles.keys
fileName = Upload.UploadedFiles(fileKey).FileName
SaveFiles = "{state: true, name: '" & Replace(fileName,"'", "\\'") & "', extra: {info: 'just a way to send some extra data', param: 'some value here'}}"
next
End If
End Function[/code]