|
ABCUpload lets you specify save locations using a number of
convenient formats. You can specify such locations as absolute
paths or as URLs and ABCUpload will automatically resolve any
references for you.
ABCUpload will interpret the following paths as absolute
references.
using WebSupergoo.ABCUpload6;
Upload theUpload = new Upload();
UploadedFile theFile = theUpload.Files["filefield"];
theFile.SaveAs("h:\\mydir\\myfile.txt");
theFile.SaveAs("h:/mydir/myfile.txt");
theFile.SaveAs("//myserver/mydir/myfile.txt");
theFile.SaveAs("\\\\myserver\\mydir\\myfile.txt");
Imports WebSupergoo.ABCUpload6
Dim theUpload As Upload = New Upload()
Dim theFile As UploadedFile = theUpload.Files("filefield")
theFile.SaveAs("h:\mydir\myfile.txt")
theFile.SaveAs("h:/mydir/myfile.txt")
theFile.SaveAs("//myserver/mydir/myfile.txt")
theFile.SaveAs("\\myserver\mydir\myfile.txt")
It will interpret the following paths as relative URLs and will
convert them to absolute paths before saving the file in the
appropriate location.
using WebSupergoo.ABCUpload6;
Upload theUpload = new Upload();
UploadedFile theFile = theUpload.Files["filefield"];
theFile.SaveAs("myfile.txt");
theFile.SaveAs("uploads/myfile.txt");
theFile.SaveAs("../images/myfile.jpg");
Imports WebSupergoo.ABCUpload6
Dim theUpload As Upload = New Upload()
Dim theFile As UploadedFile = theUpload.Files("filefield")
theFile.SaveAs("myfile.txt")
theFile.SaveAs("uploads/myfile.txt")
theFile.SaveAs("../images/myfile.jpg")
ABCUpload decides whether a path should be interpreted as a URL
or as an absolute file path using a simple heuristic. If the
path...
- contains a colon it will be interpreted as an absolute
path
- contains a backslash it will be interpreted as an absolute
path
- starts with "//" it will be interpreted as an absolute UNC
path
- otherwise it will be assumed to be a URL
|