Results 1 to 19 of 19

Thread: asp upload function?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Cool asp upload function?

    Does anyone know where i can get full source code to allow me to carry out an upload function, using ASP?
    Gilly

  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Arrow hi

    Perphaps this thread would help....

    http://www.vbforums.com/showthread.p...ghlight=upload

  3. #3
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    Use this attachment here. It contains a .VBP and .asp Files. Compile the VB Project and make a DLL out of it.
    Have a Interface ASP File and include the code in the UploadReceive.asp file here.

    This should do the job. Get bac for clarifications, if any. Let me know if it worked.

    - Jemima.
    Attached Files Attached Files

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651
    Hi Jemima

    Thanks for ur zip file. I have downloaded it, created a dll, however my asp page doesnt seem to be able to call the dll.

    What can i do??
    Gilly

  5. #5
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Gilly, alternatively, try out Asp smart's upload control. it pretty nifty and it's also free which is always a good thing.

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  6. #6
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Arrow gilly

    If you are using a dll file then it is needed that u register it on your server.

    Otherwise u can use the other link which I have given you which is normal ASP coding and requires no registering...

  7. #7
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    Gilly,
    If u created the DLL in system you are going to run the ASP, it should work. Otherwise, copy the DLL into the destination machine and register it.
    BTW, did u mean it gave a "Server.CreateObject Failed - Invalid Class String" Error?

    - Jemima.

  8. #8
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    I have to agree with Ian.. The Asp Upload worked really well I used it on a site.. I recommend the SmartUpload too. What are you trying to upload?

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651
    i need to be able to upload text/images/db etc. however i dont want to use a dll. i only want to use .asp and .htm files. Ive downloaded a few examples from the web which seem to work fine, unitl you try to download onto your server or client. It simply downloads the .asp file instead of the actual document you selected. ??
    Gilly

  10. #10
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    huh??

    Come again???

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651
    sorry for being unclear!! Ive attached an example to let you see exactly what i mean.

    follow the steps once you unzip the file...
    1. attach a file to upload
    2. then download to your choosen location
    3.open up the file you selected, it opens getnew.asp, instead of the actual document you selected for download.

    ???
    Any ideas?
    Thnx
    Attached Files Attached Files
    Gilly

  12. #12
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    First you do NOT need that many browse buttons - even for multiple file uploads.

    I am give you one - u can try whether it works for u - got it from a site. - works nicely for me
    Attached Files Attached Files

  13. #13
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276

    Thumbs up

    Thats cool guys! I wasn't lucky enough to get this code while i was developing my site. Will consider revamping now, if time permits.

    - Jemima.

  14. #14
    Addicted Member
    Join Date
    Aug 2000
    Posts
    225

    Progress bar during file upload?

    veryjonny,

    First of all your ASP files in the upload.zip worked AWSOME! Thanks for the post, I have been looking for a solution like that for weeks.

    On another note.....
    How would I go about putting a progress bar on the screen during the upload (or is it even possible)?

    Thanks again!

  15. #15
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    You would be able to create some progress bar using javascript but i DONT think would be able to synchronise it with the actual upload process.

    Alternatively what u can do is that as soon as someone clicks on upload - show a layer (div tag using javascript) which contains an image sort of showing the upload process - thus informing the user that something is going on - instead just showing him a blank screen.

  16. #16
    New Member
    Join Date
    Aug 2002
    Location
    Arizona
    Posts
    9

    WebClient class .NET upload method HELP!! 405 Error

    There is a website that my company logs into everyday and uploads our credit card transactions every day in a text file. My boss wants me to create a program that completely automates this process without anybody having to log in. The browser upload control isnt what I am looking for. I am looking for back end code that allows me to grab our local text file every day and upload this text file to paypals server.

    I assume that the WebClient class in .NET is my answer. using the System.Net namespace. It has an upload file method that allows the the program to upload a specified file. For example:

    WebClient w = new WebClient();
    w.uploadfile("http://www.aspxsoftware.com/collector/Transaction.txt", "POST", @"C:\Temp\Transaction.txt");

    I keep getting the 405 method not allowed error. I have given my directory write permissions. I still get the error. I can upload files from one location in my directory to another. Example:

    WebClient w = new WebClient();
    //this code would transfer Transaction.txt file in Temp directory to CreditTrans directory.
    w.uploadfile(@"C:\CreditTrans\Transaction.txt", "POST", @"C:\Temp\Transaction.txt");

    The above code will work without errors.

    The WebClient class also has a download method that I can also get to work fine. Example:

    WebClient w = new WebClient();
    w.downloadfile("http://www.aspxsoftware.com/collector/Transaction.txt", @"C:\Temp\Transaction.txt");

    I just cant get the Upload method in the WebClient class to upload files to a specified directory with an http:// address. I cant even get it to work with my http://localhost address.

    I keep getting the 405 error method not allowed. Does anybody know how to use the upload method in the WebClient class for .NET? Any suggestions would be helpful. Thanks.

  17. #17
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345
    I TRIED THE DLL BUT IT DID NOT WORK IN UPLOADING THE FILES. IT GIVES AN ERROR FORM INPUT NAME NOT FOUND.
    Thanks.

  18. #18
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Look at this link

  19. #19
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345
    i tried all the liks. can someone give me a working code. i'm in a tight schedule.
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width