Public Ticket #3845018

Registration Files Not Downloading

Closed
Comments
5 Tickets 2
Imran started the conversation 2 years ago on March 25, 2025 at 4:36pm

Hello,
When we attempt to download the files that users upload during registration, the downloaded files show as 0 bytes and cannot be opened or viewed.

2,762
KingsPlugins replied 2 years ago on March 26, 2025 at 9:50pm

Hello Imran,

We've seen this kind of issue before. Sometimes it happens depending on server download / security settings. We have a few code snippets that can change how this download process works. 

 

Please try the following:

(A) Add the following PHP code snippet to your site:

add_filter('b2bking_download_file_go_to', function($vat){    
    return 1;
}, 10, 1);

 

(B) If the above snippet cannot help solve it, please add the following snippet instead:

add_filter('b2bking_download_file_go_to', function($vat){    
    return 2;
}, 10, 1);

This should make the download button go directly to the file in the media library.

 

Let me know if that can do it,

Kind regards,

Stefan

1

Sign In