For security reasons we don't want to grant all users access to sub-directories under c:\a5webroot for image, audio, and video data upload and storage. We want to direct uploads to the desktop application area under D:\Paladin Workgroup Manager.
Our PathAlias is set as follows:
[PathAlias.ADB_Path] = =a5.get_path()
[PathAlias.ADB] = C:\A5Webroot\
[Recordings_Path] = D:\Paladin Workgroup Manager\Call_Recordings\
The code on our Call Recordings upload page is as follows:
<html>
<head>
<form action=" <%a5
? request.script_name
%> " method="post" enctype="multipart/form-data">
<input type="file" name="FileToUpload" >
<input type="submit" name="cmd" value="Upload File">
</form>
<%a5
dim msg as c = ""
if eval_valid("cmd")
dim fn as C
fn = "[Recordings_Path]" + FileToUpload.filename
file.from_blob(fn, FileToUpload.data)
msg = "<a href=\"/" + FileToUpload.filename + "\" target=\"_blank\">" + FileToUpload.filename + "</a> was uploaded<br /><br />"
tbl = table.open("callrecordings")
And the HTML error that we get when we try to load the page is this:
500 Internal Server Error
"Script Error
Error:Script: /CallRecordings.a5w line:14
file.from_blob(fn, FileToUpload.data)
The filename, directory name, or volume label syntax is incorrect.
C:\A5Webroot\D:\Paladin Workgroup Manager\Call_Recordings\03NET4.WAV"
Is there anyway to get the Alias [Recordings_Path] to drop the C:\A5Webroot preface from the fn variable?
Mike
Our PathAlias is set as follows:
[PathAlias.ADB_Path] = =a5.get_path()
[PathAlias.ADB] = C:\A5Webroot\
[Recordings_Path] = D:\Paladin Workgroup Manager\Call_Recordings\
The code on our Call Recordings upload page is as follows:
<html>
<head>
<form action=" <%a5
? request.script_name
%> " method="post" enctype="multipart/form-data">
<input type="file" name="FileToUpload" >
<input type="submit" name="cmd" value="Upload File">
</form>
<%a5
dim msg as c = ""
if eval_valid("cmd")
dim fn as C
fn = "[Recordings_Path]" + FileToUpload.filename
file.from_blob(fn, FileToUpload.data)
msg = "<a href=\"/" + FileToUpload.filename + "\" target=\"_blank\">" + FileToUpload.filename + "</a> was uploaded<br /><br />"
tbl = table.open("callrecordings")
And the HTML error that we get when we try to load the page is this:
500 Internal Server Error
"Script Error
Error:Script: /CallRecordings.a5w line:14
file.from_blob(fn, FileToUpload.data)
The filename, directory name, or volume label syntax is incorrect.
C:\A5Webroot\D:\Paladin Workgroup Manager\Call_Recordings\03NET4.WAV"
Is there anyway to get the Alias [Recordings_Path] to drop the C:\A5Webroot preface from the fn variable?
Mike
Comment