Zipper icon indicating copy to clipboard operation
Zipper copied to clipboard

How to use usePassword method in zipper ?

Open jignesh-huskerit opened this issue 9 years ago • 4 comments

Hello, I am new to Laravel and not much aware of PHP, so please tell me how to use 'usePassword' method for extract zip file which is password protected.

anyone, please help me,

Thanks in advance, Jignesh

jignesh-huskerit avatar Oct 21 '16 07:10 jignesh-huskerit

+1

Rdxer avatar Jun 14 '18 03:06 Rdxer

"Call to a member function usePassword() on null"

Rdxer avatar Jun 14 '18 03:06 Rdxer

$zipper = new Zipper(); $zipper->usePassword('pwd');

    $zipper->make('zf/test.zip')->add(Storage::path('files/LCZbGYgqOW2xFFMouh4VkVUEMEUFjQJgKgN9HC2Q.pdf'));

    $zipper->close();

Rdxer avatar Jun 14 '18 03:06 Rdxer

This isn't working for me either. No exception but the zip is created without a password.

$zipper = Zipper::make('dir.zip')->add($dir);

$zipper->usePassword('password');

$zipper->close();

bradley-varol avatar Nov 16 '18 17:11 bradley-varol