Account created on 13 September 2011, over 13 years ago
#

Recent comments

🇮🇹Italy zanonmark

Closing because of many months without an update.
Feel free to reopen if the issue persists.

Thanks,
MZ

🇮🇹Italy zanonmark

Hi,

first of all, apologies for replying so late.

1) You said "uninstalling pdfp", You mean You physically deleted the directory from the /modules directory, right?
2) After uninstalling PFDP, is Configuration > Media > File System ok, i.e.: is the Default downloading method still set to Private?
3) If You have raw access to the machine, could You please report some lines from, say, syslog or error.log?

Thanks,
MZ

🇮🇹Italy zanonmark

Thanks for Your info.

I just released 3.1.1 which checks against 0 (integer) instead of '0' (string) or the previous constant (string too).
It works well under MySQL too.

Thanks,
MZ

🇮🇹Italy zanonmark

Thanks for reporting this issue, which actually seems like a bug indeed - and a one lying there for about 10 years, since they actually changed that constant from an integer to a string (I guess most of the people here is using MySQL, which probably casts strings to 0?).

Only, I replaced with an integer, not a string.
Could You please check the latest code and tell me if everything works for You?

Thanks,
MZ

🇮🇹Italy zanonmark

Thanks for reporting Your issue.

However, I wasn't able to reproduce it. Enabling 'By-user checks' and then clicking on 'Add directory' was flawless, as concretely adding a directory.

Did You clear the cache after installing / updating the module?

Thanks,
MZ

🇮🇹Italy zanonmark

Hi,

I admit I have no experience on this (I never tried to create directories from code), but I *think* You could succeed by running $pdf_directory->save() where $pdf_directory should be an instance of DirectoryEntity (https://git.drupalcode.org/project/private_files_download_permission/-/b...); in other words, try setting the public $id, $path etc. then run ->save().

Hope it helps a little,

MZ

🇮🇹Italy zanonmark

Hi,

this is working as designed: this module was never meant to create directories, but to assign permissions to existing directories.

Thanks,
MZ

🇮🇹Italy zanonmark

Hi,

You say:
"
I think PFDP should just grant more permission, but not remove any 3rd party permission.
"
but this is exactly what an access module is for :)
Whenever a private download is attempted, Drupal ask ALL of the modules to give their opinion: if any (1 is enough) module says "to me, this file should not be downloaded" the download operation is aborted.

I think You could get what You're looking for by just enabling the "Bypass" option in PFDP for specific directories.
This should make PFDP ignore any decision, thus letting others decide.

Could You please try?

Thanks,
MZ

🇮🇹Italy zanonmark

Hi,

when a private file is going to be downloaded, all the registered modules may give Drupal their "opinion" about allowing or denying the operation.
The "Enable override mode" allows PFDP to force the file download immediately, instead of waiting for other Drupal modules to decide.
In other words, only the PDFP validation chain is taken into account.

To get what You want, it should be enough to add the directory "/inline-images" in PFDP granting the "Anonymous user" the right to download files.
Just tried with D 9.5.7 and it works.

Thanks,
MZ

🇮🇹Italy zanonmark

Hi, and sorry for my late reply.

Yes, PFDP by default prevents downloading.
You must authorize what can be downloaded, item-by-item.
As far as I can see, this is working as designed.

But I think I'll give a deeper reading at Your message in the next days. It probably makes sense.

Thanks,
MZ

🇮🇹Italy zanonmark

Hi,

as far as I can tell, the "private" directory You chose is actually public because it's a subdirectory of webroot,

try moving private_files outsite webroot (generally this means: outside /var/www if under Linux, or outside C:\Apache24 if under Windows),

alternatively You could place a .htaccess file in private_files denying public access, but I prefer the first method.

Best regards,
MZ

Production build 0.71.5 2024