---
title: "Endast bild???"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/101743-endast-bild"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "freddssite"
published: "2004-04-18T00:32:38.000Z"
updated: "2004-04-18T07:44:31.000Z"
replies: 1
views: 136
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/101743-endast-bild"
---

# Endast bild???

## #1 — freddssite, 2004-04-18T00:32Z

\<%	
Set Upload = Server.CreateObject("Persits.Upload.1")

	Upload.OverwriteFiles = False
	On Error Resume Next

	Upload.SetMaxSize 1048576	' Limit files to 1MB
	
	If contentType="image/gif" or  "image/pjpeg" THEN 
	
	Count = Upload.SaveVirtual("/db/filer")

else 
response.write("fel filformat")
end if %\>

Varför får inte gif eller jpg sparas!? Just nu släpps ingen bild eller fil igenom...!

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

## #2 — Bosse168, 2004-04-18T07:44Z

Gör så här istället för att kolla filen:

```
Ext = LCase(Right(File.Path, 4))
If Ext <> ".jpg" and Ext <> ".gif" and Ext <> ".bmp" Then

   Response.Write "Filen " & File.Path & " är inte av rätt sort.<br>Bara .gif .jpg och .bmp är tillåtna"

End If
```

Läs mer i [manualen](http://www.aspupload.com/manual.html)

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/101743-endast-bild
