Uploading large files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Markus Ernst

    Uploading large files

    Hi

    For a CMS admin tool I would like to provide a possibility to upload large
    files to a directory on the webserver. As HTTP uploads are limited in file
    size and also not comfortable in handling, I thought of an FTP solution.

    Displaying a link to ftp://mydomain.com/mydirectory is easy but limited to
    browsers who can act as FTP clients, such as Internet Explorer.

    When looking at PHP's FTP functions and googling for web-based FTP
    applications it looks like they all need an HTTP upload to get the data to
    the webserver which acts as an FTP client then.

    Java applets usually provide the whole FTP functionality, but I don't want
    the user to do something else than uploading files; and I don't speak Java
    so I could adapt an applet to my needs.

    I thought of a PHP script that could act as something like an intermediate
    client: Establish the connection between the FTP server and the remote
    computer. But I don't think this is possible.

    I would be very happy to get pointed to better ideas on that. How do you
    handle large file uploads?

    --
    Markus


  • Kasjan

    #2
    Re: Uploading large files

    Markus Ernst napisa³(a):[color=blue]
    > Hi
    >
    > For a CMS admin tool I would like to provide a possibility to upload large
    > files to a directory on the webserver. As HTTP uploads are limited in file
    > size and also not comfortable in handling, I thought of an FTP solution.
    >
    > Displaying a link to ftp://mydomain.com/mydirectory is easy but limited to
    > browsers who can act as FTP clients, such as Internet Explorer.
    >
    > When looking at PHP's FTP functions and googling for web-based FTP
    > applications it looks like they all need an HTTP upload to get the data to
    > the webserver which acts as an FTP client then.
    >
    > Java applets usually provide the whole FTP functionality, but I don't want
    > the user to do something else than uploading files; and I don't speak Java
    > so I could adapt an applet to my needs.
    >
    > I thought of a PHP script that could act as something like an intermediate
    > client: Establish the connection between the FTP server and the remote
    > computer. But I don't think this is possible.
    >
    > I would be very happy to get pointed to better ideas on that. How do you
    > handle large file uploads?
    >[/color]

    try this:

    edit php.ini


    ;;;;;;;;;;;;;;; ;
    ; File Uploads ;
    ;;;;;;;;;;;;;;; ;

    ; Whether to allow HTTP file uploads.
    file_uploads = On

    ; Temporary directory for HTTP uploaded files (will use system default
    if not
    ; specified).
    upload_tmp_dir = I:\temp

    ; Maximum allowed size for uploaded files.
    upload_max_file size = 2M

    Comment

    • Markus Ernst

      #3
      Re: Uploading large files

      Kasjan wrote:
      [color=blue]
      > try this:
      >
      > edit php.ini
      >[/color]

      Thank you for this input. As I am on shared hosting I can't change the ini
      settings; and then there is still the limitation that HTTP uploads are not
      convenient at large file sizes (such as 10 MB plus), so I hope to find a
      non-HTTP solution.

      --
      Markus


      Comment

      • Bruce Lewis

        #4
        Re: Uploading large files

        "Markus Ernst" <derernst@NO#SP #AMgmx.ch> writes:
        [color=blue]
        > and then there is still the limitation that HTTP uploads are not
        > convenient at large file sizes (such as 10 MB plus), so I hope to find a
        > non-HTTP solution.[/color]

        Why do you say that? I routinely do HTTP uploads that size. Why do you
        really think FTP would work better?

        --
        Make that pile of digital photos presentable: http://ourdoings.com/
        It's quicker and easier than you think.

        Comment

        • Markus Ernst

          #5
          Re: Uploading large files

          Bruce Lewis wrote:[color=blue]
          > "Markus Ernst" <derernst@NO#SP #AMgmx.ch> writes:
          >[color=green]
          >> and then there is still the limitation that HTTP uploads are not
          >> convenient at large file sizes (such as 10 MB plus), so I hope to
          >> find a non-HTTP solution.[/color]
          >
          > Why do you say that? I routinely do HTTP uploads that size. Why do
          > you really think FTP would work better?[/color]

          Because you don't get any feedback on the state of the upload. As the upload
          can easily take several minutes, you have to wait and don't see if the
          upload is still going on or your browser crashed.

          --
          Markus


          Comment

          • Good Man

            #6
            Re: Uploading large files

            "Markus Ernst" <derernst@NO#SP #AMgmx.ch> wrote in
            news:41767c5c$0 $25310$afc38c87 @news.easynet.c h:
            [color=blue]
            > Thank you for this input. As I am on shared hosting I can't change the
            > ini settings; and then there is still the limitation that HTTP uploads
            > are not convenient at large file sizes (such as 10 MB plus), so I hope
            > to find a non-HTTP solution.[/color]

            AFAIK, you will not be able ot find a non-HTTP solution.

            If the lack of feedback during file upload is your main concern, you can
            try browsing a couple of classes at www.phpclasses.org , perhaps even
            http://www.phpclasses.org/browse/package/1554.html or just do a search for
            'progress bar'. I haven't tried any of these, but I think that's what you
            are after if indeed your big gripe is the lack of client/server feedback.

            If you wanted to go non-HTTP for file uploads, you'd have to run a totally
            seperate program outside of the web-browser (or a java applet within it).

            Good luck...

            Comment

            • Bruce Lewis

              #7
              Re: Uploading large files

              "Markus Ernst" <derernst@NO#SP #AMgmx.ch> writes:
              [color=blue]
              > Because you don't get any feedback on the state of the upload. As the upload
              > can easily take several minutes, you have to wait and don't see if the
              > upload is still going on or your browser crashed.[/color]

              Ah, sounds like an Internet Explorer problem. Since creating the site I
              do big uploads to, I've been using firefox. A progress bar on the lower
              right shows the status of the upload.

              --
              Make that pile of digital photos presentable: http://ourdoings.com/
              It's quicker and easier than you think.

              Comment

              • Coder Droid

                #8
                Re: Uploading large files

                > Thank you for this input. As I am on shared hosting I can't change the
                ini[color=blue]
                > settings;[/color]

                Have you tried .htaccess to change the setting? Even if you can't edit
                php.ini many shared hosting services will allow .htaccess files
                (assuming this is apache, of course).

                --cd


                Comment

                • Good Man

                  #9
                  Re: Uploading large files

                  Bruce Lewis <brlspam@yahoo. com> wrote in
                  news:nm9oeixfbv j.fsf@biohazard-cafe.mit.edu:
                  [color=blue]
                  > "Markus Ernst" <derernst@NO#SP #AMgmx.ch> writes:
                  >[color=green]
                  >> Because you don't get any feedback on the state of the upload. As the
                  >> upload can easily take several minutes, you have to wait and don't
                  >> see if the upload is still going on or your browser crashed.[/color]
                  >
                  > Ah, sounds like an Internet Explorer problem. Since creating the site
                  > I do big uploads to, I've been using firefox. A progress bar on the
                  > lower right shows the status of the upload.[/color]

                  i don't think is necessarily true, in that the progress bar can reach
                  maximum before a large file is uploaded....

                  Comment

                  • Markus Ernst

                    #10
                    Re: Uploading large files

                    Good Man wrote:[color=blue]
                    > "Markus Ernst" <derernst@NO#SP #AMgmx.ch> wrote in
                    > news:41767c5c$0 $25310$afc38c87 @news.easynet.c h:
                    >[color=green]
                    >> Thank you for this input. As I am on shared hosting I can't change
                    >> the ini settings; and then there is still the limitation that HTTP
                    >> uploads are not convenient at large file sizes (such as 10 MB plus),
                    >> so I hope to find a non-HTTP solution.[/color]
                    >
                    > AFAIK, you will not be able ot find a non-HTTP solution.
                    >
                    > If the lack of feedback during file upload is your main concern, you
                    > can try browsing a couple of classes at www.phpclasses.org , perhaps
                    > even http://www.phpclasses.org/browse/package/1554.html or just do a
                    > search for 'progress bar'. I haven't tried any of these, but I think
                    > that's what you are after if indeed your big gripe is the lack of
                    > client/server feedback.
                    >
                    > If you wanted to go non-HTTP for file uploads, you'd have to run a
                    > totally seperate program outside of the web-browser (or a java applet
                    > within it).
                    >
                    > Good luck...[/color]

                    Thanks... I had a look at the phpclasses.org classes, they both just draw
                    the progress bar, but don't make any relation to a file upload, which seems
                    to be impossible with PHP. But now I found a small app that uses a Perl
                    functionality for this:



                    Raditha also has a very interesting article at his site on building a
                    web-based FTP app with PHP, where (s)he points out very clearly why PHP/FTP
                    uploads need an HTTP upload first. And Raditha's company provides a
                    drag-and-drop upload applet (better than what I was looking for...) at very
                    reasonable pricing:



                    Thanks all for the discussion.

                    --
                    Markus


                    Comment

                    Working...