Link to home
Start Free TrialLog in
Avatar of tolppa
tolppa

asked on

ASPX: How to get full url from local computer

Hello. I am creating simple upload control that allow user to choose documents to upload. Problem: Seems like the file upload control does not give me the full url.  string myUrl = FileUploadControl.X; does not gives me something like "name.doc" but I need C:\XX\XX\Documents\name.doc"

Obviously I am missing something, but how on Earth can I get full url of the local file.
SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tolppa
tolppa

ASKER

Thanks. I am programming against sharepoint API which asked me to provide URL. Still, I actually did not need to provide URL but byte[] array. Apparently url works only when using files that exist in server. Solution was:

//FileUploadControl things
byte[] filethings= new byte[attach.ContentLength - 1]; 
SPFile spfile = myLibrary.Files.Add(fileinfo.Name, filethings, metadata_spthing, replaceFilesBoolean);

Open in new window