spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.78k stars 1.08k forks source link

Cannot add a protected PDF document #3660

Closed Sans84 closed 3 months ago

Sans84 commented 4 months ago

When I try to add a password-protected PDF file to the library, I get an exception indicating that the file is protected: This file requires a password for access

freekmurze commented 4 months ago

I'd accept a PR that fixes this.

gurpreetkaits commented 3 months ago

Hi @freekmurze, It's working I tried.

@Sans84 any way to reproduce?

Sans84 commented 3 months ago

Hey, @gurpreetkaits

Hi @freekmurze, It's working I tried.

What works?

@Sans84 any way to reproduce?

Any document that is password protected for viewing

I'd accept a PR that fixes this.

@freekmurze, I have solved this problem for now by catching the error when generating the conversion for PDF. But I'm not sure if this is a good solution for PR

gurpreetkaits commented 3 months ago

Hey, @Sans84

So, What I tried is, I uploaded the password protected pdf. And there was no error. And later on, after uploading done I accessed the pdf so, it all worked.

I'm not sure if I'm missing your point somewhere. This is what I understood.