G
Grant Harmeyer
I have an application that uses FreeTextBox 2.0
(http://www.freetextbox.com). FreeTextBox is a rich text editor that behaves
similarly to MS Word. The FreeTextBox control has a button to insert images
(just as you would with MS Word) and it works beautifully. The problem is
that when you include an image with the rich text editor, the image path is
the local path on the client. I have written a method that examines the text
for <img> tags, extracts the local path, and then replaces it with what the
virtual path will be after the file has been saved to the server.
I would like post the file to the server as I would with an HtmlInputFile
(PostedFile) control using the HttpPostedFile object, but it would appear
that this is not allowed. After doing some digging, it looks like my best
option would be to write a Web Service that accepts the image as a byte
array and use the WebClient object to upload the file to the service.
It sounds like this would work but I don't really know how to approach this.
I would rather just straight post the file to the HttpPostedFileCollection
just like an HtmlInputFile control does, but that doesn't look like a
possible option. If anyone knows a good means to upload a file without the
HtmlInputFile control, please let me know.
TIA,
Grant Harmeyer
(http://www.freetextbox.com). FreeTextBox is a rich text editor that behaves
similarly to MS Word. The FreeTextBox control has a button to insert images
(just as you would with MS Word) and it works beautifully. The problem is
that when you include an image with the rich text editor, the image path is
the local path on the client. I have written a method that examines the text
for <img> tags, extracts the local path, and then replaces it with what the
virtual path will be after the file has been saved to the server.
I would like post the file to the server as I would with an HtmlInputFile
(PostedFile) control using the HttpPostedFile object, but it would appear
that this is not allowed. After doing some digging, it looks like my best
option would be to write a Web Service that accepts the image as a byte
array and use the WebClient object to upload the file to the service.
It sounds like this would work but I don't really know how to approach this.
I would rather just straight post the file to the HttpPostedFileCollection
just like an HtmlInputFile control does, but that doesn't look like a
possible option. If anyone knows a good means to upload a file without the
HtmlInputFile control, please let me know.
TIA,
Grant Harmeyer