tahaazare/secure-download 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tahaazare/secure-download

最新稳定版本:v1.0.1

Composer 安装命令:

composer require tahaazare/secure-download

包简介

Generate secure download links with expiration in Laravel

README 文档

README

📖 Introduction | معرفی

این پکیج به شما کمک می‌کند تا برای فایل‌های خود لینک دانلود امن و موقت تولید کنید.
به‌طوری‌که لینک فقط برای مدت مشخصی معتبر باشد (مثلاً ۳۰ ثانیه، ۵ دقیقه یا ۲ ساعت)
و فقط برای یک مسیر مشخص قابل استفاده باشد. همچنین برای اینکه محدودیت تعداد دانلود و اطلاعات لینک‌ها به درستی ذخیره شود،
باید پس از نصب پکیج دستور migrate را اجرا کنید تا جدول‌های لازم در دیتابیس ساخته شود.

This package helps you generate secure, temporary download links for your files in Laravel. Each link is valid for a specific time (e.g., 30 seconds, 5 minutes, or 2 hours) and is only usable for the given file path.

To track download limits and link information, you must run database migrations after installation to create the necessary table

📦 نصب | Installation

1. Install the Package

Run the following command in your Laravel project terminal:

composer require tahaazare/secure-download

2. Publish the Configuration File (Optional but Recommended)

php artisan vendor:publish --provider="Tahaazare\SecureDownload\SecureDownloadServiceProvider"

The config file will be located at

config/secure-download.php

3. Migration

php artisan migrate

🛠 Generate Secure Download Link | ساخت لینک دانلود امن (Quick Usage)

$link = SecureDownload::generate(
    'files/report.pdf',
    30,
    TimeUnitEnum::Seconds,
    FileTypeEnum::Storage,
    null, //int | max_downloads 
);

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-14