사이트갤럭시
사이트갤럭시를 이용하여 파일업로드 구현방법 소스
업로드 페이지
<form name="UploadForm" action="upload.asp" method="post" encType="multipart/form-data">
<input type='file' name='image1'>
</form>
파일을 저장하는 페이지
Dim file_upload, fs, fsdir, upfile, filedir
'사이트갤럭시 생성
Set file_upload = Server.CreateObject("SiteGalaxyUpload.Form")
Set fs = CreateObject("Scripting.FileSystemObject")
' 저장할 경로 구하기
fsdir = server.mappath("\") & "\upload\"
'이미지 업로드
upfile = file_upload("image1")
If Len(upfile) > 0 Then
filedir = file_upload("image1").filepath
Image1 = mid(filedir, instrrev(filedir,"\")+1)
file_upload("image1").saveas fsdir & Image1
Response.Write "파일 업로드 완료!"
Else
Response.Write "파일 업로드 실패!"
End If
오래된 자료를 포스팅 합니다.
'Programming > ASP.NET' 카테고리의 다른 글
| ASP.NET 웹서비스 만들기 #4 (WebForm) (0) | 2025.12.18 |
|---|---|
| ASP.NET 웹서비스 만들기 #3 (WebForm) (1) | 2025.12.18 |
| ASP.NET 웹서비스 만들기 #2 (WebForm) (0) | 2025.12.17 |
| ASP.NET 웹서비스 만들기 #1 (WebForm) (0) | 2025.12.16 |