www.webdeveloper.com
Results 1 to 8 of 8

Thread: Download File from Server/Upload to it

  1. #1
    Join Date
    Jul 2012
    Posts
    2

    Download File from Server/Upload to it

    Hello,

    I am fairly new to Javascript.

    I'd like to create a connection speed test such that the script initiates a download of a file from the server to the client, and then the client uploads the file back to server.

    I am not certain how to do this using Javascript. Can I have some help on this, please?

    Thanks!

  2. #2
    Join Date
    Jan 2011
    Location
    United Kingdom, London
    Posts
    117
    I suppose you could use HTML5 File API for that purpose, that's best IMHO
    Javascript, jQuery / Prototype & PHP expert ready to complete your work on Freelancer.co.uk - Hire Me at https://www.freelancer.co.uk/users/1...&action=hireme

  3. #3
    Join Date
    Jul 2012
    Posts
    12
    I'm fairly new to javascript myself so this could be a stupid remark, but isn't javascript Client-side scripting? Aren't there better languages for handling these sort of this? Like php or perl?

  4. #4
    Join Date
    Jan 2011
    Location
    United Kingdom, London
    Posts
    117
    And how other way would you like to display client speed if not using client-side scripting? Most of - if not all - speed tests use client-side flash scripts.
    Javascript, jQuery / Prototype & PHP expert ready to complete your work on Freelancer.co.uk - Hire Me at https://www.freelancer.co.uk/users/1...&action=hireme

  5. #5
    Join Date
    Jul 2012
    Posts
    12
    Quote Originally Posted by maurycy View Post
    And how other way would you like to display client speed if not using client-side scripting? Most of - if not all - speed tests use client-side flash scripts.
    I don't know, was just thinking out loud. Like I said I'm pretty new to the whole thing.

    I was thinking something in the lines of: letting, for example, php handle the down- and upload. Use Javascript/css for the display of the data. Wouldn't this keep server scripting and client scripting seperated? Which could be more practical depending of the size, duration, ... of the project.
    Last edited by tapi0n; 07-16-2012 at 08:10 AM.

  6. #6
    Join Date
    Jan 2011
    Location
    United Kingdom, London
    Posts
    117
    Tapi0n it's good to think out loud

    If you let PHP handle download/upload then you will not be able to determine user connection speed because PHp will be executed on server and it'll be server speed not user if that makes sense to you
    Javascript, jQuery / Prototype & PHP expert ready to complete your work on Freelancer.co.uk - Hire Me at https://www.freelancer.co.uk/users/1...&action=hireme

  7. #7
    Join Date
    Jul 2012
    Posts
    12
    Quote Originally Posted by maurycy View Post
    Tapi0n it's good to think out loud

    If you let PHP handle download/upload then you will not be able to determine user connection speed because PHp will be executed on server and it'll be server speed not user if that makes sense to you
    Ye thought about that a couple of minutes after posting. Ah well, you new acquire new insight every day, today is no exception

  8. #8
    Join Date
    Jul 2012
    Posts
    2
    Thanks for the advice. Do you know of any good tutorials on this approach?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles