Use Vault with Classic ASP

Hi,

I want to make use of Vault with classic asp page. Does it supports Classic ASP? I tried to integrate it but I got no success, as it is tricky to convert code of handler in classic asp.
Then I tried by using Vault with my custom code to upload the image. The image gets uploaded but it shows error. I found the color of file name in the file lists div red. Moreover, in IE 9 it is not working. The file dialog box is not getting opened. Am I going in wrong way? Is it not supported in Classic SP?

Thanks,
Priya

Hi

we need more details about an issue. please provide completed demo (send it to support@dhtmlx.com or open ticket), screenshots, ste-by-step how to reproduce.

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]

Not bad!