Forum Issue: Download name does not match file name

PublisonPublison Posts: 11,438
edited 2015-07-23 - 16:53:00 in General Discussion
I don't think this has officially reported, correct me if I'm wrong, but it has been seen in some post. I am finding it hard to deal with.
If you download a file (Spin, text, etc) it is being renamed to some string that has nothing to do with the file. It requires catching it immediately and renaming it. 

Comments

  • I tried with a zip file I found and it was named correctly.

    Can you provide me a specific instance where you know this happens?
  • Hold on. I think it was of Duane's latest posts.
  • YES, I can!!!

    For example in the Propeller 1-2-3 FPGA Board(#60054) thread, Tubular has a post on the second page with an attachment.

    When hovered over the file image, you see: Prop123_A7.zip

    The link is:

    http://forums.parallax.com/uploads/FileUpload/2d/6025a9451aec2693380d2e658c7a19.zip

    and the file, of course ends up saving as: 6025a9451aec2693380d2e658c7a19.zip :lol:
  • No, I didn't gather all that so quickly!

    I saw Jim's thread which reminded me of the problem which I didn't report when I saw it (shame on me) and started collecting a documented example to help out this thread.
  • I had a similar issue when downloading from any site using Windows 7. When I went to download a file it would change the extension to .eeprom. If I remember correctly the problem had to do with a bad file association.
  • PublisonPublison Posts: 11,438
    edited 2015-07-23 - 17:19:12
    OK, it was in Duane's post:
    http://forums.parallax.com/discussion/161702/resources-for-propeller-servo-controller-usb/p1
    Download either the Servo32v9.spin or the Servo_Ramp_v2.spin and see what you get.
    Using Win 7 64Bit and Chrome.
    Edit: Boy you guys jumped on it quickly! :) I know I was not the only one. Just surprised now one else complainied.




  • Ok, adding this to the issues list and then sinking this thread.

    Jim and mindrobots: thank you for having an example on hand to show me.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-07-23 - 17:40:22
    I forgot to complain...not very gen-x for a young baby-boomer!!!
    :lol:

    Thanks, Courtney! Glad I could help!
  • Had the same problem here: http://forums.parallax.com/discussion/comment/1336839/#Comment_1336839
    Thought, I'am the only one with this problem.
  • TorTor Posts: 1,999
    cascaz reported the problem in the propforth thread today and I tested and confirmed the problem there. So something isn't right, although it may not be universal.
  • SRLMSRLM Posts: 5,045
    edited 2015-07-23 - 18:44:16
    The solution is pretty simple: just set the appropriate header with the filename that you want:
    ```header("Content-Disposition: attachment; filename='$filename'");
    ```
    You don't need to rewrite the URL or anything.

  • If people mention this bug you can (if you'd like) let them know that IT is already aware of this problem.
  • The solution is pretty simple: just set the appropriate header with the filename that you want:
    ```header("Content-Disposition: attachment; filename='$filename'");
    ```
    You don't need to rewrite the URL or anything.



    I guess we just want it the way it was before. There should not have to be workarounds.
    You and I know how  to make some magic, but I was looking out for the neebies. :)

  • Setting the headers is a server side solution, not a client side solution. We need that work around since the forum appears to make the URLs unique by giving every upload it's own UUID. So the header is there to hint to the browser to ignore the URL as the filename, and instead use whatever is given.
  • The file downloaded to your system should be stored as the original file name, not the internal UUID-mangled version. I see that it has been added to the triage list, so I'll hop over there and see what's going on.

  • The file downloaded to your system should be stored as the original file name, not the internal UUID-mangled version. I see that it has been added to the triage list, so I'll hop over there and see what's going on.



    Thanks Jim. 
    I know you guys are working every day to bring everyone a better user experience.
Sign In or Register to comment.