Hello,
I am creating an upload page for my web app. I am wanting feedback on the upload process, and the ability to do some file manipulation both on the server and with SQL. So the standard Alpha Five file upload modules will not work for me.
Here is a script that I found that looks quite promising: http://exposureroom.biz/upload.aspx
Every thing on this page looks like it can easily be done in an A5w page. Where I am pushing my knowledge limits is how to get the POST data collected by the javascript function to xbasic.
Here is the javascript function snipit and the POST command that calls a aspx page. Again I would like to call xbasic here.
Clip of code is from http://exposureroom.biz/upload.aspx)
How could I pass this "POST" data to an xbasic script?
Obviously this script calls a aspx page with some code behind script
that is writing the POST data to the server. But I would like to avoid
doing this and use only xbasic.
Can the a5 xbasic stay on the same page?
I would like to do something like this:
Thanks for your help,
I am creating an upload page for my web app. I am wanting feedback on the upload process, and the ability to do some file manipulation both on the server and with SQL. So the standard Alpha Five file upload modules will not work for me.
Here is a script that I found that looks quite promising: http://exposureroom.biz/upload.aspx
Every thing on this page looks like it can easily be done in an A5w page. Where I am pushing my knowledge limits is how to get the POST data collected by the javascript function to xbasic.
Here is the javascript function snipit and the POST command that calls a aspx page. Again I would like to call xbasic here.
Clip of code is from http://exposureroom.biz/upload.aspx)
Code:
function uploadFile() { var xhr = new XMLHttpRequest(); var fd = document.getElementById('form1').getFormData(); /* event listners */ xhr.upload.addEventListener("progress", uploadProgress, false); xhr.addEventListener("load", uploadComplete, false); xhr.addEventListener("error", uploadFailed, false); xhr.addEventListener("abort", uploadCanceled, false); /* Be sure to change the url below to the url of your upload server side script */ [B]xhr.open("POST", "UploadMinimal.aspx");[/B] xhr.send(fd); }
Obviously this script calls a aspx page with some code behind script
that is writing the POST data to the server. But I would like to avoid
doing this and use only xbasic.
Can the a5 xbasic stay on the same page?
I would like to do something like this:
Code:
<%a5 if eval_valid("fileToUpload") dim fn as C fn = "[PathAlias.ADB_Path]\images\\" + FileToUpload.filename fn = FileToUpload.filename file.from_blob(fn, FileToUpload.data) %>
Comment