globalxtreme/compress-file

GlobalXtreme compress file with go and php

1.0.2 2023-04-24 19:07 UTC

This package is auto-updated.

Last update: 2024-12-01 00:22:03 UTC


README

Version Total Downloads License

Install with composer

For install with Composer, simply require the latest version of this package.

composer require globalxtreme/compress-file

Server

If you install this package in server (ubuntu or centos), you must be add script in composer.json.

{
  "scripts": {
    "post-autoload-dump": [
      "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 
      "@php artisan package:discover --ansi",
      "sh vendor/globalxtreme/compress-file/src/go/install-moduls.sh"
    ]
  }
} 

You can manual run "sh vendor/globalxtreme/compress-file/src/go/install-moduls.sh" from command line if you don't want to add it in "composer.json"

sh vendor/globalxtreme/compress-file/src/go/install-moduls.sh

Local

If you install this package in local (mac or windows or etc), you can temporarily disable or remove "sh vendor/globalxtreme/compress-file/src/go/install-moduls.sh" from "composer.json" and run this script.

cd vendor/globalxtreme/compress-file/src/go

go build -o resize-image resizeImage.go
go build -o resize-video resizeVideo.go

Video Compress

For video compress, you must be install "ffmpeg" on your device (mac, windows, linux)