Database Code
  Home arrow Database Code arrow Portuguese Upload component
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DATABASE CODE

Portuguese Upload component
By: aspfree
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 43
    2001-03-13

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    We received this upload component from Evandro F in brazil.  This is a freecomponent he designed and wanted to share this component.  Here is his page he donefor us!  Enjoy this free component done in in Portuguese!This uploader it's a component to be use in your Asp the .zip file has a example (inPortuguese). You can ...

    We received this upload component from Evandro F in brazil.  This is a freecomponent he designed and wanted to share this component.  Here is his page he donefor us!  Enjoy this free component done in in Portuguese!

    This uploader it's a component to be use in your Asp the .zip file has a example (inPortuguese). You can use this for free.

    Download do MandArquivo beta 0.2
    MandArquivo
    Web Upload - Documentação on-line
    ©1998 Marco Mugnatto Macedo

    1 - Introdução

    1.1 - O que é o MandArquivo

    O MandArquivo é um componente freeware desenvolvido comtecnologia ASP para realizar Uploads de arquivos via Browser (Web), seguindo os padrõescompatíveis com as versões mais novas do Netscape e do Internet Explorer.

    1.2 - Novidades

    17/7/98 - Nova versão beta 0.2!

    • Agora sim! Resolvido o maior dos problemas surgidos até agora: o MandArquivo está mais rápido agora pois não grava mais um arquivo temporário quando se realiza um upload. Tudo é tratado na memória. Obrigado ao "aolsux" da EfNet pela dica!

    15/7/98 - Terminada a primeira versão beta!!!

    • Após muita pesquisa e tentativa & erro, está pronta a primeira versão 0.1 beta do MandArquivo. Os testes realizados ainda foram muito poucos, e conto com a sua ajuda através de emails reportando problemas, sugestões, comentários, etc.

    1.3 - Softwarerequerido

    Os seguintes softwares precisam estar instalados noservidor para que a DLL do MandArquivo possa funcionar:

    • Windows 95 ou NT. O MandArquivo até a presente data não foi testado em Windows NT.
    • Microsoft Internet Information Server 4.0 ou Microsoft Personal Web Server (roda no Win95) com suporte a ASP e ADO.
    • Microsoft Visual Basic 5.0 ou as bibliotecas de run-time do VB 5.0 instaladas. Estas bibliotecas podem ser encontradas em alguns sites, como http://www.download.com

    1.4 - Instalação

    É distribuída apenas a DLL do MandArquivo, portanto énecessário registrar a DLL manualmente da seguinte forma:

    No Prompt do DOS, mude para o diretório onde você tivercolocado a DLL e digite:

    regsvr32 MandArquivo.DLL

    1.5 - Legenda

    Tudo o que estiver em itálico, deve ser substituído pelodado do tipo correspondente.

    Tudo o que estiver entre colchetes ([ e ]) é opcional,dependendo do uso.

    1.6 - Como utilizar oMandArquivo

    É necessária a criação de duas páginas, uma HTML eoutra ASP no site que for utilizar o MandArquivo.

    A página em HTML contém o formulário com um campo dotipo "FILE" para a escolha e envio de arquivos e um botão Submit. A tag quedefine o início do formulário deve obrigatoriamente conter o parâmetro enctype="multipart/form-data".Abaixo está um exemplo de código para a página HTML:

    <html>

    <head>
    <title>Página para envio de arquivos</title>
    </head>

    <form action="upload.asp" method="POST" enctype="multipart/form-data">
    <INPUT TYPE="FILE" NAME="ARQUIVO">
    <p><input type="submit" name="Botao" value="Submeter"></p>
    </form>

    </body>
    </html>

    Atenção: O formulário de envio doarquivo pode conter apenas um único campo do tipo "FILE" para upload doarquivo, além do botão Submit. Qualquer outro campo presente será ignorado ou poderáprovocar erros.

    Já a página ASP recebe e grava o arquivo no disco,utilizando o componente MandArquivo. Os procedimentos necessários são:

    1 - Criar uma instância do componente através da seguintesintaxe:

    <%Set objetoUpload =Server.CreateObject(MandArquivo.Upload)%>

    onde objetoUpload é um nome qualquer de variávelque conterá uma instância do componente.

    2 - Ordenar ao componente que execute o upload e grave oarquivo na pasta especificada do servidor através do método RequererArquivo.

    3 - Opcionalmente, pode-se exibir os valores daspropriedades do MandArquivo ao usuário.

    onde objetoUpload é um nome qualquer de variávelque conterá uma instância do componente.

    Abaixo está um exemplo de código para a página ASP:

    <html>

    <head>
    <title>Status do Upload</title>
    </head>

    <%
    Set Arquivo=Server.CreateObject("MandArquivo.Upload")

    Arquivo.RequererArquivo "c:\temp"

    Response.Write "<p>Arquivo enviado: " & Arquivo.Nome & "</p>"
    Response.Write "<p>Tamanho: " & Arquivo.Tamanho & " bytes</p>"
    %>

    </body>
    </html>

    2 - Propriedades e métodos

    2.1 - Propriedades

    Todas as propriedades do MandArquivo estão listadas nestetópico.

    Neste tópico, objetoUpload deverá ser sempresubstituído pelo nome da instância do componente MandArquivo.Upload que for criadaatravés de CreateObject (item 1.5).

    2.1.1 - Nome

    Retorna o nome do arquivo que foi enviado pelo usuário.

    Sintaxe:

    objetoUpload.Nome

    Exemplo:

    Response.Write "Arquivo " & Arquivo.Nome & " enviado com sucesso"

    2.1.2 - Tamanho

    Retorna o tamanho em bytes do arquivo enviado.

    Sintaxe:

    objetoUpload.Tamanho

    Exemplo:

    Response.Write "Obrigado. Você acaba de me enviar " & Arquivo.Tamanho & " bytes!!!"

    2.1.3 - CaminhoCompleto

    Retorna o caminho original completo do arquivo na máquina do usuário.

    Sintaxe:

    objetoUpload.CaminhoCompleto

    Exemplo:

    Caminho = Arquivo.CaminhoCompleto

    2.2 - Métodos

    Todos os métodos do MandArquivo estão listados nestetópico.

    Neste tópico, objetoUpload deverá ser sempresubstituído pelo nome da instância do componente MandArquivo.Upload que for criadaatravés de CreateObject.

    2.2.1 - RequererArquivo

    Faz o upload do arquivo e grava na pasta especificada.

    Sintaxe:

    objetoUpload.RequererArquivo Caminho

    Onde:

    Caminho = Uma string definindo o caminho (path) onde deverá ser gravado o arquivo no servidor.

    Exemplo:

    Arquivo.RequererArquivo "c:\temp\"

    3 - Download e condições

    3.1 - Condiçõespara o download e uso do MandArquivo

    IMPORTANTE: Para fazer o download doMandArquivo você deverá primeiro concordar com cada uma das seguintes condições.

    1. Está disponível para download somente o .DLL do componente MandArquivo. Não há programa de instalação. Veja o ítem 1.3 desta documentação para instruções sobre como instalar. É necessário algum conhecimento prévio do assunto.
    2. O MandArquivo é FREEWARE, podendo ser baixado e utilizado gratuitamente, podendo ser utilizado livremente como ferramenta para confecção de suas próprias páginas na Internet ou Intranet, páginas estas com ou sem fins lucrativos, desde que seguidas as condições aqui presentes.
    3. O MandArquivo em sí pode ser livremente distribuído, desde que sem fins lucrativos (salvo com autorização prévia do autor) e sem alterações.
    4. Este programa é freeware. O AUTOR NÃO SE RESPONSABILIZA POR NENHUM DANO QUE POSSA OCORRER AO EQUIPAMENTO DO USUÁRIO OU AO USUÁRIO DESTE PRODUTO. Inclúi-se aí (mas não limitado a) perda de dados, mal funcionamento, virus, enfim, qualquer coisa que possa ocorrer. O RISCO SERÁ TODO SEU.
    5. Este programa é freeware. NÃO HAVERÁ GARANTIA DE NENHUM TIPO DE SUPORTE AO USUÁRIO DESTE PRODUTO. Você pode me enviar emails com dúvidas, sugestões, ou outros, mas NÃO HAVERÁ GARANTIA DE RESPOSTA.

    3.2 - Linkpara o download da DLL

    Se você concordou com as condições do item 3.1, cliqueno link abaixo para fazer o download do MandArquivo!

    ©1997 MarcoMM Webdesigner

    Page 1

    <html>

    <head>
    <title>Página para envio de arquivos</title>
    </head>

    <form action="upload.asp" method="POST"enctype="multipart/form-data">
    <INPUT TYPE="FILE" NAME="ARQUIVO">
    <p><input type="submit" name="Botao"value="Submeter"></p>
    </form>
    </body>
    </html>

    Page 2

    html>

    <head>
    <title>Status do Upload</title>
    </head>

    <%
    Set Arquivo=Server.CreateObject("MandArquivo.Upload")

    Arquivo.RequererArquivo "c:\temp"

    Response.Write "<p>Arquivo enviado: " & Arquivo.Nome &"</p>"
    Response.Write "<p>Tamanho: " & Arquivo.Tamanho & "bytes</p>"
    %>
    </body>
    </html>


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Database Code Articles
    More By aspfree

     

    IBM® developerWorks developerWorks - FREE Tools!


    NEW! "ebook: Exploring IBM SOA Technology & Practice

    Learn field-tested SOA principles, methodology, technology and implementation from the global SOA market leader - in a new e-book by an IBM SOA expert. Written by IBM Certified SOA Solution Designer Bobby Woolf, "Exploring IBM SOA Technology & Practice" is the ultimate insider's guide to SOA - a PDF e-book packed cover to cover with IBM's specific advice on how to make your SOA implementation a success.
    FREE! Go There Now!


    NEW! Trial download: IBM Rational Functional Tester V7.0.1

    Get a free trial download of the latest version of IBM Rational Functional Tester V7.0.1. Rational Functional Tester is an automated functional and regression testing solution for QA teams concerned with the quality of their Java, Microsoft Visual Studio .NET, and Web-based applications.
    FREE! Go There Now!


    NEW! Maintaining QoS and Process Integrity in an SOA Environment

    This webcast outlines the best practices that must be instituted to gain the maximum benefit from SOA while maintaining high quality of service. Whether you are deploying new applications or managing and monitoring your existing infrastructure, learn how you can ensure high quality of services with SOA based solutions from IBM. All registrants who attend this live Web Seminar will receive complimentary access to a white paper titled “Maintaining QoS in an SOA Environment”.
    FREE! Go There Now!


    NEW! Understanding Web application security challenges

    As businesses grow increasingly dependent upon Web applications, these complex entities grow more difficult to secure. Most companies equip their Web sites with firewalls, Secure Sockets Layer (SSL), and network and host security, but the majority of attacks are on applications themselves – and these technologies cannot prevent them. This paper explains what you can do to help protect your organization, and it discusses an approach for improving your organization’s Web application security.
    FREE! Go There Now!


    Role of Integrated Requirements Management in Software Delivery

    As organizations integrate software into every aspect of business, they are constantly pressured to deliver faster, better, and cheaper results. Unfortunately, a “dis-integrated” software delivery approach reduces returns while increasing costs. This IBM Rational White Paper shows how Integrated Requirements Management aligns organizations around maximizing value and keeping pace with change.
    FREE! Go There Now!


    NEW! Best Practices: The Integrated Project and Portfolio Management Platform.

    Hear how IBM Rational Project and Portfolio Management integrated solutions help teams put the right tools and processes in place to maximize the effectiveness and efficiency of project teams and ensure that the business vision is being executed correctly. Learn how to automate and integrate requirements prioritization, top-down project planning, communications and controls, and methodology deployment to keep your scope, costs, and schedules under control. Tackle with an end-to-end approach the management of scope and scope changes, usage of methodology to control and empower project teams, and optimization of resources to align activity costs with the overall project plan.
    FREE! Go There Now!


    NEW! Download a free trial of Lotus Quickr 8.0

    Visit IBM developerWorks to download a free trial version of Lotus Quickr 8.0, which enables collaboration by transforming the way everyday business content such as documents, rich media, photos, and video can be shared. Lotus Quickr makes it faster and easier to share content of all types (not just documents) within virtual teams. It is designed to make it easier to collaborate across organizational boundaries, while continuing to work within the context of familiar desktop applications.
    FREE! Go There Now!


    NEW! Rational Talks to You: Scott Ambler on being agile in a global development environment

    Join this Rational Talks to You teleconference on December 6 at 1:00 pm ET to participate in an agile application development discussion and get your questions answered on using IBM Rational Method Composer in a distributed environment.Get your questions answered!
    FREE! Go There Now!


    NEW! Using IBM Rational Developer for System z and IBM Rational ClearCase together to manage application development

    Whether you are creating new applications or modifying existing ones, managing integration of new components with traditional z/OS elements is a critical part of building and deploying modern applications. Listen to this webcast to see how IBM can help you optimize your development process using an IDE like Rational Developer for System z that integrates with management tools, such as ClearCase to manage your application development on mainframes.
    FREE! Go There Now!


    NEW! Rational Talks to You: Grady Booch on Architecture

    Join this Rational Talks to You teleconference on November 29 at 1:00 pm ET to participate in an interactive discusssion with Grady Booch around architecture and reuse. Get your questions answered!
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    DATABASE CODE ARTICLES

    - Deployment of the MobiLink Synchronization M...
    - MobiLink Synchronization Wizard in SQL Anywh...
    - Finding Matching Records in Data Access Pages
    - Using the AccessDataSource Control in VS 2005
    - A Closer Look at ADO.NET: The Command Object
    - A Closer Look at ADO.NET: The Connection Obj...
    - Using ADO to Communicate with the Database, ...
    - Code Snippets: Counting Records
    - Constraints In Microsoft SQL Server 2000
    - Multilingual entries into a DB and to be dis...
    - Getting A List of Tables From SQL Server
    - SQL Server Database Creator - .NET Version
    - ADO Recordset Paging
    - Two combos, one textbox example
    - Discussion & Listserv Module by Mike Eck...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway