Menu

Download Link Problem

Help
B737Capt
2006-06-08
2013-06-03
  • B737Capt

    B737Capt - 2006-06-08

    Some links to files that have been upload do not come out properly.  The very end of the link is not clickable or part of the link as it should be.  Is there a fix for this?

     
    • TNTEverett

      TNTEverett - 2006-06-08

      There is only a fix if your know what the problem is. 
      PHPformgen attemtps to attach a date stamp to file names so that files of the same name don't get overwritten.  These names then have to be converted to links when sent in the email or displayed in any followup pages. 
      My guess would be that one or more of the name conversions is failing. 
      If you can not figure it out come back and let me know.  To do anything more I would have to see your form and process.php file. 

       
      • endee1

        endee1 - 2007-03-21

        I'm having the same problem. It seems to happen when theres a space in the uploaded file name.

        Links in email show but the end of the link isn't linked - e.g below the text up to the end of the word Skype shows highlighted as a link, "in a Bag.png" doesn't, so when you click the link it goes to  http://mydomain.com/phpform/use/pic1/files/10_43_05_Skype instead of the full link

        Photo1: http://mydomain.com/phpform/use/pic1/files/10_43_05_Skype in a Bag.png

         
    • endee1

      endee1 - 2007-03-21

      If I copy/paste the link from the email into browser
      http://mydomain/phpform/use/pic1/files/11_35_38_Architect Skype.png
      it changes to
      http://mydomain/phpform/use/pic1/files/11_35_38_Architect%20Skype.png and the pic displays
      so I guess what we need is to replace spaces in filenames with %20
      Only problem is I don't know how.....................

       
      • TNTEverett

        TNTEverett - 2007-03-21

        In your proces.php file you will find lines that look like this;
        $PropertyAddressCity=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $PropertyAddressCity);

        Take a look at the preg_replace function.  In the above line the function replaces (\015\012) or (\015) or (\012) with "&nbsp;<br>".  If you find an ascii to octal conversion chart you will see that the \015 is the carriage return character, and the \012 is the line feed character.  The variable $PropertyAddressCity is evaluated and charcaters are replaced if necessary. 

        In your example you would want something like this;
        $yourvariable=preg_replace("/(\040)/","%20", $yourvariable);
         

         
    • Musawir Ali

      Musawir Ali - 2007-03-21

      explicitly replacing characters is not a good idea. use the urlencode() function

       
      • endee1

        endee1 - 2007-03-23

        Had to use rawurlencode to get it working, with urlencode the space was replaced with a "+"

        Photo1: ".$where_form_is."files/".rawurlencode($image_list[5])."

         
    • Musawir Ali

      Musawir Ali - 2007-03-23

      or that.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.