This content has been marked as final. Show 4 replies
Did you ever find an answer? I am looking at a similar problem today. Thanks.
You can upload files from Flex using the FileReference class, but not with WebService.
On the .net side, i use this function (sorry that the forum destroys formatting):
Public Shared Function saveUploadFile(ByVal context As HttpContext, _
Optional ByRef sErrInfo As String = "") As Boolean
Dim bReturn As Boolean = False
Dim postedFile As HttpPostedFile = context.Request.Files(0)
Dim sDestFolderRoot As String = ConfigurationSettings.AppSettings.Get("sUploadRootFolder")
Dim sCustomerFolder As String = Utility.nullHandler(context.Request("customerFolder"))
'sCustomerFolder = sCustomerFolder.Replace("/", "\")
Dim sFileName As String = postedFile.FileName
Dim sFileSpec As String = sDestFolderRoot & sCustomerFolder & System.IO.Path.GetFileName(sFileName)
If Not postedFile Is Nothing And sFileName <> "" Then
bReturn = True
LogEvent.logEventEntry("edd_p_suf", "EchoDomeData", "Persistence", "info", "Saving uploaded file to: " & sFileSpec)
bReturn = False
sErrInfo &= "No files sent."
So does this mean you POST the file to a servlet, rather than to a web service? That is what we were afraid we would have to do too.
"Servlet" may not be the right word in the .net world. Maybe "executable program on the server with a URL address" is the terminology.
Anyway thanks a lot for the help.
Yes, I use an aspx file with no UI. Set:
<%Response.ContentType = "text/xml"%> in the aspx page, and always return xml strings in the response.