How to make direct dawnlaod Link in code

views.com
0

To add a direct download button in a Blogger post, follow these steps:

Steps:

  1. Upload the File

    • Use Google Drive or any cloud storage service.
    • If using Google Drive:
      • Upload the file.
      • Right-click → "Get Link" → Change to "Anyone with the link".
      • Copy the direct file ID from the link (e.g., if your link is https://drive.google.com/file/d/1A2B3C4D5/view?usp=sharing, then the file ID is 1A2B3C4D5).
      • Create a direct download link:

      • https://drive.google.com/uc?export=download&id=FILE_ID
      • Example

      •  https://drive.google.com/uc?export=download&id=1A2B3C4D
      • Embed the Code in Blogger Post

        • Open Blogger and create/edit a post.
        • Switch to HTML View (not Compose mode).
        • Paste the following code:
         
        <a href="https://drive.google.com/uc?export=download&id=1A2B3C4D5" class="download-btn" download>
            <button style="background-color: #28a745; color: white; padding: 10px 20px; font-size: 18px; border: none; border-radius: 5px; cursor: pointer;">
                Download Now
            </button>
        </a>


 

 Publish the Post Click Publish and test the download button.

Tags

Post a Comment

0Comments
Post a Comment (0)