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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 / 44
    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


    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!


    IBM DB2 Deep Compression ROI Tool

    The IBM DB2 Deep Compression ROI tool is designed for DBA’s and IT management personnel to perform a clinical analysis of the cost savings gained from the Storage Optimization feature of DB2 9 for Linux, UNIX and Windows. The feature, also known as Deep Compression, compresses data that lies within a database by up to 80% at times.
    FREE! Go There Now!


    IBM – Taking Web 2.0 to Work

    You'll get answers to many questions and more from David Barnes, Lead Evangelist for IBM Emerging Internet Technologies. David will discuss aspects of Web 2.0 that bring value to corporations, academia, and government. He'll also discuss IBM's vision around Web 2.0, including the importance of remixability and consumability. The discussion will culminate with examples of various IBM Software Group solutions you can use to get ahead of the Web 2.0 adoption curve.
    FREE! Go There Now!


    NEW! A Layered approach to delivering security-rich Web applications

    As businesses grow increasingly dependent upon Web applications to provide services to customers, employees and partners, these complex applications become more difficult to secure. Although traditional security solutions protect Internet infrastructure layers, they do not guard against HTTP and HTML attacks. Many organizations that conduct security testing still deploy applications that allow attackers to manipulate their logic and wreak havoc on their business. To mitigate this risk, development and delivery teams must address Web application security throughout the lifecycle, addressing the many layers detailed in this paper.
    FREE! Go There Now!


    NEW! Best Practices in Integrated Requirements Management

    Poor Requirements Management capabilities in an Enterprise have been linked to excessive project failures, escalating IT costs, and failure to deliver competitive advantage into the marketplace. Join Brianna M Smith from IBM Rational and learn about how successful organizations align IT and Business stakeholders through collaborative processes and tools for effective requirements management, and how an integrated approach across the IT lifecycle can provide unparalleled visibility and traceability to ensure that project teams are delivering on the business vision by "doing the right things" and "doing things right."
    FREE! Go There Now!


    NEW! Develop Systems Software Assets with IBM Rational Asset Manager

    Join us for this on demand webcast to learn about developing complex systems more quickly and efficiently. We'll cover market drivers for developing, governing and reusing systems software assets and how you can develop system software assets with Rational Asset Manager.
    FREE! Go There Now!


    NEW! Improve your build process with IBM Rational Build Forge, Part 1: Create a continuous build and integration environment

    Learn how to implement a build management system that uses and extends your existing automation technologies. This tutorial shows, step-by-step, how to install and configure IBM Rational Build Forge to manage builds for Jakarta Tomcat from source code.
    FREE! Go There Now!


    NEW! Innovate don't duplicate! Asset reuse strategies for success

    Asset Reuse is a key strategy for companies looking to create innovative solutions to solve complex software development problems. Searching for, identifying, updating, using and deploying software assets can be a difficult challenge. Listen to this webcast, to learn about strategies and tools that you can leverage for a successful project, including Rational Asset Manager, Rational Software Architect and WebSphere Service Registry and Repository.
    FREE! Go There Now!


    NEW! Successful Change and Release Management for .NET

    Join this webcast to discover the key requirements for successful change and release management. Learn how to extend your .NET environment to improve productivity and collaboration, and address core problems afflicting team development. In this webcast, we’ll review typical challenges faced by customers and how to resolve them with the IBM Rational Change and Release Management solution, including Rational ClearCase, Rational ClearQuest and Rational Build Forge. Replay is available for 9 months.
    FREE! Go There Now!


    NEW! Try the IBM SOA Sandbox for People

    Visit IBM developerWorks to try the IBM SOA Sandbox for people. The SOA Sandbox for people provides a trial environment with the necessary tooling and components required to enable consistent human and process interaction and collaboration, showing how you can improve user experience and business productivity.
    FREE! Go There Now!


    NEW! Webcast: Striking the right balance between manual and automated testing

    Join this webcast to learn how IBM Rational's Functional Testing solution enables you to implement automation your way, at your pace, with your existing staff. In this webcast, you’ll learn how you can eliminate redundancy of manual test scripts, reduce errors, and increase test coverage through test automation. After this presentation you will understand how IBM Rational Functional Testing solution can streamline your manual testing and make test automation easily attainable.
    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-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek