7 Replies Latest reply on Sep 18, 2006 8:42 AM by Newsgroup_User

    Is reading local file possible?

    Level 7
      Hi,

      My intention is to use Flash 8 Pro as a tool allowing to upload large files
      into the server (something like FTP client). Unfortunately a lot of servers
      have tight restrictions for transmition time (sometimes limited to 30s).
      Work around to this could be a Flash. I couldn't find any information in
      Flash documentation about reading binary files selected by user by
      HTML-like file field. I would like to read selected file, split it into
      severeal smaller parts and then upload every part separately into the
      server. Is it possible?

      --
      Regards,
      Marek

        • 1. Re: Is reading local file possible?
          Level 7


          Marek wrote:
          > Hi,
          >
          > My intention is to use Flash 8 Pro as a tool allowing to upload large
          > files into the server (something like FTP client). Unfortunately a lot
          > of servers have tight restrictions for transmition time (sometimes
          > limited to 30s). Work around to this could be a Flash. I couldn't find
          > any information in Flash documentation about reading binary files
          > selected by user by HTML-like file field. I would like to read selected
          > file, split it into severeal smaller parts and then upload every part
          > separately into the server. Is it possible?

          Czesc Marek

          Flash itself has no FTP capabilities. The only thing you can do is use middle ware
          like php or asp and server side to upload stuff to server and use flash to prompt
          the Browse for File dialog, and than upload your files. Flash itself has no way of
          doing it at all unless with middle ware. There is an upload samples which comes with
          flash and can be located under the SAMPLE directory on your C drive in the Macromedia
          folder. This is as far as it goes.


          --
          Best Regards

          Urami


          --


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>
          • 2. Re: Is reading local file possible?
            Level 7
            > Czesc Marek

            Hi! It seems you speak my native language :-)))

            > Flash itself has no FTP capabilities. The only thing you can do is use
            > middle ware
            > like php or asp and server side to upload stuff to server and use flash to
            > prompt
            > the Browse for File dialog, and than upload your files. Flash itself has
            > no way of
            > doing it at all unless with middle ware.

            Yes, I know that. That is the reason why I have written 'somethig like FTP'.
            Ok, once again... I can create PHP script to receive POST uploads. This is
            no problem to me. The problem is that iddle time for scripts on this
            particular server is set to 30 seconds only. It means that I can't upload
            files for which transfer time will be longer then 30s. To work around this
            issue it is necessary SPLIT uploaded file into the chunks then transfer it
            to the server and join using e.g. PHP script. I need a tool embeded on web
            page which allows me to select large file (large sometimes means 1MB) and
            send into the server jumping over server time limitations. Flash contains
            build-in FileReference class but there is no described in the documentation
            how to send selected file as e.g. 4 separate parts of it.

            > There is an upload samples which comes with
            > flash and can be located under the SAMPLE directory on your C drive in the
            > Macromedia
            > folder. This is as far as it goes.

            It is also described in Flash help under FileReference class description.


            • 3. Re: Is reading local file possible?
              Level 7

              > Yes, I know that. That is the reason why I have written 'somethig like
              > FTP'. Ok, once again... I can create PHP script to receive POST uploads.
              > This is no problem to me. The problem is that iddle time for scripts on
              > this particular server is set to 30 seconds only. It means that I can't
              > upload files for which transfer time will be longer then 30s. To work
              > around this issue it is necessary SPLIT uploaded file into the chunks
              > then transfer it to the server and join using e.g. PHP script. I need a
              > tool embeded on web page which allows me to select large file (large
              > sometimes means 1MB) and send into the server jumping over server time
              > limitations. Flash contains build-in FileReference class but there is no
              > described in the documentation how to send selected file as e.g. 4
              > separate parts of it.

              Hi Marek
              Unfortunately flash can't handle binary data.
              sorry :)

              --
              Best Regards

              Urami


              --


              <urami>
              If you want to mail me - DO NOT LAUGH AT MY ADDRESS
              </urami>
              • 4. Re: Is reading local file possible?
                Level 7
                you can use ini_set to change max_execution_time and max_input_time in your php file
                or perhaps request it from your server people and if not :) get another hosting ...
                • 5. Re: Is reading local file possible?
                  Level 7
                  > you can use ini_set to change max_execution_time and max_input_time in
                  > your php file
                  > or perhaps request it from your server people and if not :) get another
                  > hosting ...

                  Unfortunately I cant't change mentioned settings on this server. This
                  problem can appear on a lot of servers so I should find another solution for
                  my CMS system. I would like to keep my product independent from server
                  settings as far as it is possible. It seems that I have to create activex
                  control to upload files if Flash can't operate on binary data. Thanks for
                  your help.

                  • 6. Re: Is reading local file possible?
                    Level 7
                    > you can use ini_set to change max_execution_time and max_input_time in
                    > your php file
                    > or perhaps request it from your server people and if not :) get another
                    > hosting ...

                    Unfortunately I cant't change mentioned settings on this server. This
                    problem can appear on a lot of servers so I should find another solution for
                    my CMS system. I would like to keep my product independent from server
                    settings as far as it is possible. It seems that I have to create activex
                    control to upload files if Flash can't operate on binary data. Thanks for
                    your help.

                    • 7. Re: Is reading local file possible?
                      Level 7
                      > you can use ini_set to change max_execution_time and max_input_time in
                      > your php file
                      > or perhaps request it from your server people and if not :) get another
                      > hosting ...

                      Unfortunately I cant't change mentioned settings on this server. This
                      problem can appear on a lot of servers so I should find another solution for
                      my CMS system. I would like to keep my product independent from server
                      settings as far as it is possible. It seems that I have to create activex
                      control to upload files if Flash can't operate on binary data. Thanks for
                      your help.