Tuesday, September 1, 2009

Sunbeam Electric Blanket Ff Error

How to upload files on Aruba than 4 MB?

This question has populated thousands of threads in the forum for more Webmaster famous on the net ... and the answer is ... Sure you can '!

Looking good in the "handbook" of Aruba, you can find a great zip download that contains a lot of useful things for those who develop sites hosted on Aruba, programming in ASP or ASP.net.

These scripts were created by Persits and are simple to use and very effective. In
files you find on Aruba ( at this address ) found four components, namely:

- AspEmail, a component that joins CDOSYS, and allows you to send mail with various options. Used in conjunction with AspUpload makes it very easy to send attachments via e-mail via web page
- AspUpload, component to facilitate the sending of files through forms. Many options, opportunity 'to save the file to disk or database.
- AspJpeg, component for manipulating the fly image: size, rotate, crop, resolution, save to database.
- AspPdf, component for creating on the fly PDF files, the source can 'be a file of text, image, web page, form, etc.. etc. Within

found lots of examples.

In this post we're talking about, however, upload files of any size, and then I describe how to do it: First

included in the "CGI-BIN" of your space Aruba, the. Dll called "ASPUPLOADLib.dll" that found in the zip.

Then you will have a form with which you load the file type:

\u0026lt;form enctype="multipart/form-data" method="post" action="Upload.asp">
\u0026lt;input type = " file "name =" file "> \u0026lt;input

value="Carica the file" type="submit">
\u0026lt;/ form>

page upload.asp, sostanzialmente dovrà contenere 2 sole righe:

Set Upload = Server.CreateObject("Persits.Upload")
Upload.Save(Server.MapPath("/public")) 'qui impostate il percorso dove finirà il file
response.write "File caricato con successo!"

e con queste sole due righe, voi potrete caricare sul vostro server file di qualunque dimensione!!

Se poi avete bisogno di ricavare il nome del file, magari per inserirlo nel vostro database, aggiungete queste righe:

Set File = Upload.Files("file") ' qui metterete al posto di "file", il nome della input che avete nella vostra form dove caricate il file

If Not File Is Nothing Then
filename=File.FileName
end if

and behold, the variable "filename" contains the full file name extension.

Finally, if you need to rename the file, you can put these lines:

September Upload.Files = File ("file") 'put here instead of "file", the name of the input you have in your form where to upload the file

If Not File Is Nothing Then filename =
File.FileName

nuovo_filename = "text_" & filename & "" Dim
fsoMyFile
September fsoMyFile = Server.CreateObject ("Scripting.FileSystemObject")
fsoMyFile . MoveFile (Server.MapPath ("/ public /" & filename &"")), (Server.MapPath("/public/"&nuovo_filename&""))
Set fsoMyFile = nothing

end if


ed il gioco è fatto!!

Spero possa esservi utile.

0 comments:

Post a Comment