Ciao.. spero che baol dia un'occhata a questo thread..
l'upload funziona in locale ma quando lo vado a mettere sul server non scive i file
eccoil codice incriminao:
codice:<% Dim oUpload Set oUpload = new cUpload With oUpload .SetDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/mdb-database/InfogDB_Generico.mdb"),"SELECT * FROM newshome" .EnabledImageSize = TRUE .SetPath "img_news\" .Load .UploadOnly "Images" .MoveFirst .Database.open() While Not .Eof If .Files("Height")>80 or .Files("Width")>80 then Response.write ("<span class=""userpasswgrass"">LE DIMENSIONI DELL'IMMAGINE </span> <span class=""rosso11px"">" &_ .GetFileName() &"</span> <span class=""userpasswgrass""> NON SONO CORRETTE</span> <span class=""rosso11px"">(" &_ .Files("Height") &"x" & .Files("Width") &")</span>: <span class=""userpasswgrass"">Immagine non caricata!</span> " ) Test = False else .Save Select Case lcase(.Files("InputName")) Case "cmpfile": .Database.Fields("imgnh") = .GetFileName() end select Test = True end if .MoveNext Wend 'Spiegazione di questa if: inserirai i dati nel db solo se entrambe le foto hanno una dimensione corretta e se entrambe sono state caricate. If Test and .Database.Fields("imgnh") <> "" then .Database.Fields("titolo") = .Form("cmptitolo") .Database.Fields("testo") = .Form("cmptesto") .Database.Fields("data") = .Form("cmpdata") .Database.Fields("idutente") = .Form("cmputente") .Database.Fields("idcategoria") = .Form("cmpcat") .Database.Addnew response.write "<span class=""rosso11px"">" response.write ("AGGIUNTA NEWS CON IMMAGINE RIUSCITA!") response.write "</span>" elseif test = false and .Database.Fields("imgnh") = "" then .Database.Fields("titolo") = .Form("cmptitolo") .Database.Fields("testo") = .Form("cmptesto") .Database.Fields("data") = .Form("cmpdata") .Database.Fields("idutente") = .Form("cmputente") .Database.Fields("idcategoria") = .Form("cmpcat") .Database.Addnew response.write "<span class=""rosso11px"">" response.write ("LA NEWS E' STATA INSERITA CORRETTAMENTE! L'IMMAGINE NON E' STATA INSERITA POICHE' SI E' SCELTO DI NON CARICARE ALCUNA IMMAGINE CON QUESTA NEWS O PERCHE' LE DIMENSIONI DELL'IMMAGINE NON SONO CORRETTE!") response.write "</span>" else end if End With Set oUpload = Nothing %>




Rispondi quotando