21. februar 2001 - 13:29Der er
35 kommentarer og 1 løsning
Begrænsning på tilladt upload !
Hejza alle sammen,
Jeg har lige downloade aspsmartupload og jeg vil gerne bruge deres upload-system. Jeg kom til at tænke på, kan man sætte en begrænsning på, så man kan uploade f.eks. 20 kb, ad gangen ??? Og hvis een har uploadet engang, kan man ikke sætte en cookie, så han ikke kan uploade fra den com mere ?
De fleste virksomheder har efterhånden bevist, at AI virker.
Pilotprojekter leverer resultater. Medarbejdere bruger generative AI-værktøjer. Nye use cases dukker op på tværs af organisationen.
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\")
\' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") %> </BODY> </HTML> -------------
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") if MySmartUpLoad.TotalBytes > 20000 then response.write (\"filen er for stoR\") else \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") end if %> </BODY> </HTML> -------------
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") MySmartUpLoad.TotalMaxFileSize = 20000 if MySmartUpLoad.TotalBytes > 20000 then response.write (\"filen er for stoR\") else \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") end if %> </BODY> </HTML>
Nu virker det (næsten) Hvis filen er for stor, så før jeg denne fejlmeddelelse: Total File Size exceeded (Error 1110) /upload/aspSmartUpload/Sample1.asp, line 22
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") MySmartUpLoad.TotalMaxFileSize = 20000 if MySmartUpLoad.TotalBytes > 20000 then response.redirect(\"filforstor.asp\") end if \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\")
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") MySmartUpLoad.TotalMaxFileSize = 20000 if MySmartUpLoad.TotalBytes > 20000 then response.redirect(\"filforstor.asp\") end if if request.cookies(\"haruploadet\") = \"1\" then response.redirect(\"haruploadet.asp\") end if \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") Response.Cookies(\"haruploadet\").Expires = #July 4, 2010# Repsonse.Cookies(\"haruploadet\") = \"1\"
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") MySmartUpLoad.TotalMaxFileSize = 20000 if request.TotalBytes > 20000 then response.redirect(\"filforstor.asp\") end if if request.cookies(\"haruploadet\") = \"1\" then response.redirect(\"haruploadet.asp\") end if \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") Response.Cookies(\"haruploadet\").Expires = #July 4, 2010# Repsonse.Cookies(\"haruploadet\") = \"1\"
Bare glem det...det er mig der er lidt meget dum :) Fordi jeg har ikke rigtig kigget på linien, men det gjrode jeg og opdagede at der stor repsonse, men der skla stå response :)
<% \' Variables \' ********* Dim mySmartUpload Dim intCount
\' Object creation \' *************** Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\") MySmartUpLoad.TotalMaxFileSize = 20000 if request.TotalBytes > 20000 then response.redirect(\"filforstor.asp\") end if if request.cookies(\"haruploadet\") = \"1\" then response.redirect(\"haruploadet.asp\") end if \' Upload \' ****** mySmartUpload.Upload
\' Save the files with their original names in a virtual path of the web server \' **************************************************************************** intCount = mySmartUpload.Save(\"Upload\") \' sample with a physical path \' intCount = mySmartUpload.Save(\"c:\\temp\\\")
\' Display the number of files uploaded \' ************************************ Response.Write(intCount & \" file(s) uploaded.\") Response.Cookies(\"haruploadet\").Expires = #July 4, 2010# Response.Cookies(\"haruploadet\") = \"1\"
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.