LegoNat

Help With Making .ldr Files Downloadable

Recommended Posts

The building instructions for most of my MOCs are a link to download the .ldr file from bricksafe, but clicking on the link only yields a "blank page" with what seems to be the data readout of the file instead of downloading the file to the user's desktop. How can this be changed so that the user can download an .ldr file instead of opening the contents of it in a new tab?

Share this post


Link to post
Share on other sites

The building instructions for most of my MOCs are a link to download the .ldr file from bricksafe, but clicking on the link only yields a "blank page" with what seems to be the data readout of the file instead of downloading the file to the user's desktop. How can this be changed so that the user can download an .ldr file instead of opening the contents of it in a new tab?

 

I picked one of your MOCs and clicked the download.  I have a MAC with Safari and it gave me a blank page, but there was a file downloaded.  I can't open ldr files, but I put it in a text edit app and it looked like this.

 

0 Untitled

0 Name: blast rod.ldr
0 Author: MLCad
0 Unofficial Model
0 ROTATION CENTER 0 0 20 0 "Tail Lights" 
0 ROTATION CONFIG -1 1
1 0 60 32 0 0 0 -1 0 1 0 1 0 0 3034.dat
1 0 80 24 0 1 0 0 0 1 0 0 0 1 4488.dat
1 0 40 24 0 -1 0 0 0 1 0 0 0 -1 4488.dat
1 15 10 32 0 0 0 1 0 1 0 -1 0 0 6014.dat
1 15 110 32 0 0 0 -1 0 1 0 1 0 0 6014.dat
1 0 116 32 0 0 0 -1 0 1 0 1 0 0 87697.dat
1 0 4 32 0 0 0 -1 0 1 0 1 0 0 87697.dat
1 0 96 32 -200 0 0 -1 0 1 0 1 0 0 87697.dat
1 0 24 32 -200 0 0 -1 0 1 0 1 0 0 87697.dat
1 15 90 32 -200 0 0 -1 0 1 0 1 0 0 6014.dat
1 15 30 32 -200 0 0 1 0 1 0 -1 0 0 6014.dat
1 0 60 24 -200 -1 0 0 0 1 0 0 0 -1 4600.dat
1 0 60 32 -180 0 0 -1 0 1 0 1 0 0 3034.dat
1 4 60 24 -100 0 0 -1 0 1 0 1 0 0 3032.dat
1 4 60 24 -250 1 0 0 0 1 0 0 0 1 3666.dat
1 4 60 0 -130 1 0 0 0 1 0 0 0 1 3004.dat
1 4 60 0 -160 1 0 0 0 1 0 0 0 1 44126.dat
1 4 60 -24 -130 1 0 0 0 1 0 0 0 1 3298.dat
1 71 60 -40 30 -1 0 0 0 1 0 0 0 -1 3684.dat
1 71 60 24 70 -1 0 0 0 1 0 0 0 -1 6636.dat
1 71 60 -40 10 1 0 0 0 1 0 0 0 1 3678b.dat
1 71 60 -80 20 1 0 0 0 1 0 0 0 1 50943.dat
1 40 60 -32 -110 1 0 0 0 1 0 0 0 1 30602.dat
1 71 60 8 0 1 0 0 0 1 0 0 0 1 41862.dat
1 4 60 16 -20 0 0 -1 0 1 0 1 0 0 3020.dat
1 4 60 -48 40 0 0 -1 0 1 0 1 0 0 3020.dat
1 4 60 -56 70 1 0 0 0 1 0 0 0 1 3460.dat
1 4 60 8 -40 0 0 -1 0 1 0 1 0 0 3022.dat
1 4 60 0 -50 1 0 0 0 1 0 0 0 1 3023.dat
1 4 60 -8 -50 1 0 0 0 1 0 0 0 1 3710.dat
1 4 60 -16 -50 1 0 0 0 1 0 0 0 1 3710.dat
1 0 60 -40 -50 -1 0 0 0 1 0 0 0 -1 3937.dat
1 0 60 -40 -50 -1 0 0 0 1 0 0 0 -1 3938.dat
1 4 60 -48 -80 1 0 0 0 1 0 0 0 1 47755.dat
1 4 60 -56 -50 -1 0 0 0 1 0 0 0 -1 2540.dat
1 4 90 0 -130 1 0 0 0 1 0 0 0 1 4287.dat
1 4 90 -24 -170 1 0 0 0 1 0 0 0 1 4070.dat
1 4 30 -24 -170 1 0 0 0 1 0 0 0 1 4070.dat
1 4 30 -32 -160 0 0 1 0 1 0 -1 0 0 3069b.dat
1 4 90 -32 -160 0 0 1 0 1 0 -1 0 0 3069b.dat
1 47 90 -14 -184 0 0 1 1 0 0 0 1 0 6141.dat
1 47 30 -14 -184 0 0 1 1 0 0 0 1 0 6141.dat
1 4 90 -24 -150 -1 0 0 0 1 0 0 0 -1 4286.dat
1 4 30 0 -130 1 0 0 0 1 0 0 0 1 4287.dat
1 4 30 -24 -150 -1 0 0 0 1 0 0 0 -1 4286.dat
1 15 30 0 -80 0 0 1 0 1 0 -1 0 0 30414.dat
1 15 90 0 -80 0 0 -1 0 1 0 1 0 0 30414.dat
1 4 12 0 -80 0 1 0 0 0 1 1 0 0 3020.dat
1 4 4 -10 -20 0 1 0 0 0 1 1 0 0 3710.dat
1 4 108 0 -80 0 -1 0 0 0 1 -1 0 0 3020.dat
1 4 124 0 -60 0 -1 0 1 0 0 0 0 1 43712.dat
1 4 -4 0 -60 0 1 0 -1 0 0 0 0 1 43712.dat
1 4 116 -10 -20 0 -1 0 0 0 1 -1 0 0 3710.dat
1 4 132 0 -40 0 -1 0 -1 0 0 0 0 -1 41769.dat
1 4 124 0 20 0 -1 0 0 0 -1 1 0 0 2429.dat
0 MLCAD BTG L
1 4 -4 0 20 0 1 0 -0.866025 0 -0.5 -0.5 0 0.866025 2429.dat
0 MLCAD BTG R
1 4 124 0 20 0 -1 0 0.866025 0 -0.5 0.5 0 0.866025 2430.dat
1 4 -4 0 20 0 1 0 0 0 -1 -1 0 0 2430.dat
1 4 -12 0 -40 0 1 0 1 0 0 0 0 -1 41770.dat
0 MLCAD BTG R
1 4 132 12.321 38.661 0 -1 0 -0.866025 0 0.5 -0.5 0 -0.866025 44728.dat
0 MLCAD BTG L
1 4 -12 12.321 38.661 0 1 0 0.866025 0 0.5 0.5 0 -0.866025 44728.dat
0 MLCAD BTG R
1 72 112 9.981 62.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 2412b.dat
0 MLCAD BTG L
1 72 8 9.981 62.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 2412b.dat
0 MLCAD BTG R
1 36 122 -7.341 52.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 6141.dat
0 MLCAD BTG L
1 36 -2 -7.341 52.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 6141.dat
0 MLCAD BTG R
1 38 102 -7.341 52.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 6141.dat
0 GROUP 5 R
0 MLCAD BTG L
1 38 18 -7.341 52.713 -1 0 0 0 0.5 -0.866025 0 -0.866025 -0.5 6141.dat
0 GROUP 5 L
0

Share this post


Link to post
Share on other sites

This might be a bit late. But, my browser (Chrome on Windows 10) downloads the files just fine. I don't know if Nathan fixed it already or not, but in any case: if it does open as text in the browser (an LDraw file is actually a text file with a different extension), you have to right click on the link and press 'save as'.
 
As a sidenote: I believe I had the same problem when making the OMR site. I fixed it by adding an html5 attribute 'download' to the link, so (a supported browser) is being told to actually download it instead of opening it. Like so:

<a href="path" download>Click here!</a>

Share this post


Link to post
Share on other sites