---
title: "ABCUpload - MaxUploadSize"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/111700-abcupload-maxuploadsize"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "sifix"
published: "2004-09-16T16:12:49.000Z"
updated: "2004-09-16T21:44:53.000Z"
replies: 2
views: 403
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/111700-abcupload-maxuploadsize"
---

# ABCUpload - MaxUploadSize

## #1 — sifix, 2004-09-16T16:12Z

Har hamnat på ett webbhotell med ABCUpload och får inte ihop det med MaxUploadSize.

Om filen är större än det tillåtna så kommer det ett felmedelande som berättar detta. Och det är inte så snyggt. 

Har provat med leght och redirect men då får jag att sidan inte kan visas.

Någon som har en lösning på detta??? 

Här har vi koden

```
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = true
theForm.MaxUploadSize = 64000
Set theField = theForm("image1")(1)
If theField.Length>64000 then 
	response.Redirect("sida.asp")
else
	response.Write(theField.Length)
	If theField.FileExists Then theField.Save "bild.gif"
end if
```

Permalänk: https://www.webforum.nu/p/111700

## #2 — Ivar, 2004-09-16T20:18Z

Kanske med Server.transver

Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = true
theForm.MaxUploadSize = 64000
Set theField = theForm("image1")(1)
If theField.Length\>64000 then 
	Server.transver("sida.asp")
else
	response.Write(theField.Length)
	If theField.FileExists Then theField.Save "bild.gif"
end if

Permalänk: https://www.webforum.nu/p/1440897

## #3 — Ivar, 2004-09-16T21:44Z

Skrev fel  det ska vara  Server.transfer

Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = true
theForm.MaxUploadSize = 64000
Set theField = theForm("image1")(1)
If theField.Length\>64000 then 
Server.transfer("sida.asp")
else
response.Write(theField.Length)
If theField.FileExists Then theField.Save "bild.gif"
end if

Permalänk: https://www.webforum.nu/p/1440935

---

Tråden på webben: https://www.webforum.nu/amne/asp/111700-abcupload-maxuploadsize
