MATRIX Server 파일을 upload 합니다.
Syntax
public bool UploadFile( string filePath, string serverFolder, string ServerFilename, bool deleteOnComplete )
Parameters
filePath |
|---|
Type: String
Upload 할 local file name Fullpath
serverFolder |
|---|
Type: String
server folder 명 (server/reports 하위 폴더, 없는 경우 생성됨)
serverFilename |
|---|
Type: String Optional (Default : "")
Server 에 저장될 File명 (생략할 경우 local 파일명, 지정할경우 server 의 저장될 파일명)
deleteOnComplete |
|---|
Type: bool Optional (Default : false)
upload 완료후 local 파일 자동 삭제 여부 (생략할 경우 local 파일 유지, true 일경우 local 파일 삭제)
Return Value
Type: bool
정상일 경우 : true
오류 일경우 : false
Example
'==========================================================================
'서버에 file을 upload 합니다.
'server/reports/folderxxx 에 생성됩니다.
'==========================================================================
Public Sub UploadFileTest()
Dim mxmodule As Object
Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").Object
result = mxmodule.xapi.UploadFile("c:\test3.csv", "folder1")
'첫번째 컬럼의 값을 사용
If result = False Then
MsgBox "upload fail " & mxmodule.xapi.LastErrorMessage
Else
MsgBox "upload success"
End If
End Sub