suresh pondicherry
asked on
Add local file to HttpPostedFileBase
Hi All,
Advance thanks.
My existing page has upload button and can do upload feature using post method and finally add the files from HttpRequest to HttpPostedFileBase. This works fine.
My issue is
Have to do upload but not through drag and drops or selecting from the folder. Instead, i need to attach the local file into HttpPostedFileBase.
HttpPostedFileBase fileBase = load file using File.Open(path, FileMode.Open);
I know it is not possible because it's abstract class. My issue is i have to use HttpPostedFileBase but i need to load a local file into it.
please help.
Kind regards,
Pooja
Advance thanks.
My existing page has upload button and can do upload feature using post method and finally add the files from HttpRequest to HttpPostedFileBase. This works fine.
My issue is
Have to do upload but not through drag and drops or selecting from the folder. Instead, i need to attach the local file into HttpPostedFileBase.
HttpPostedFileBase fileBase = load file using File.Open(path, FileMode.Open);
I know it is not possible because it's abstract class. My issue is i have to use HttpPostedFileBase but i need to load a local file into it.
please help.
Kind regards,
Pooja
ASKER
server side
Alright. And I understand this is an ASP.Net code so what exactly you want to do with this local file by getting it inside HttpPostedFileBase . Please don't mind but I want to understand if we can come up with something better by understanding your business requirements.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you say local file is this a file on the server or on the client side?
Regards,
Chinmay.