jDownloadsownloads.com


Author Topic: Downloaded 0 Bytes  (Read 819 times)

0 Members and 1 Guest are viewing this topic.

Offline debugger

  • Newbie
  • *
  • Posts: 30
Downloaded 0 Bytes
« on: 20.11.2018 05:41:19 »
Hi,

I used another server for dl.mysite.com
Site works well before use CDN
After that, when click to dowload, downloaded 0 Bytes(See Atachment)
Turn off CDN, But downloaded 0 Bytes
changed DNS to primary, But downloaded 0 Bytes
Recover to last backup, But downloaded 0 Bytes

I play by
config>Downloads> "Activate direct-downloading? " & "Send Downloads using the PHP Script? "
config>Security>"Protect your Download-directory?" & "Activate Hotlinking protection? "

But the result was not

In my cpanel i used from "A Record" for dl.mysite.com
all files in dl.mysite.com is ok and i can download that

Best Regards


Joomla! 3.9.0
jDownloads 3.2.63
Cpanel
Database Version    10.2.18-MariaDB-cll-lve
Database Collation    latin1_swedish_ci
Database Connection Collation    utf8mb4_general_ci
PHP Version    7.2.12
Web Server    Apache
WebServer to PHP Interface    litespeed
GZip Enable
Folder Writable
post_max_size    128M
upload_max_filesize    256M
.htaccess enable

Offline debugger

  • Newbie
  • *
  • Posts: 30
Re: Downloaded 0 Bytes
« Reply #1 on: 20.11.2018 06:16:54 »
Before my problem I use a direct link:
Downloads> Data Files> External File Link (See Settings)

After saving, the file size will automatically appear

But now it does not compute the file size and shows 0B

I can download the direct link from dl.mysite.com

I think for it, but I do not know how to solve it

Offline debugger

  • Newbie
  • *
  • Posts: 30
Re: Downloaded 0 Bytes
« Reply #2 on: 20.11.2018 14:15:10 »
I found that
Change dl.maysite.com to another subdomain dll.maysite.com and works fine
Idont know why! but works ;)

Offline ColinM

  • Moderator
  • *
  • Posts: 3.975
Re: Downloaded 0 Bytes
« Reply #3 on: 21.11.2018 17:57:58 »
hi
If the file to be downloaded is on a different main domain to the one on which jD is installed then it is not feasible in the general sense for jD to determine the actual file size (or date) so at present you need to fill in the file size when creating the Download. (or editing if size not set).  The upload code is generally the browser and it does not return thesize.Colin


Offline debugger

  • Newbie
  • *
  • Posts: 30
Re: Downloaded 0 Bytes
« Reply #4 on: 13.12.2018 23:05:42 »
When link is direct in another domain or... JD can see the size and show that

Offline ColinM

  • Moderator
  • *
  • Posts: 3.975
Re: Downloaded 0 Bytes
« Reply #5 on: 16.12.2018 10:40:11 »
Hi
In general if it is an external site then jD cannot determine size as it cannot definitely get to the relevant information.  There may be cases where jD would have access tothe directory info but that is not the usual situation.  So if it is an external site jD does not attempt to see if it can find the info.It is a case of trying to give a definitive way for users that covers all situations.ColinPS maybe jD wiull try to be cleverer in a new version but...

Offline debugger

  • Newbie
  • *
  • Posts: 30
Re: Downloaded 0 Bytes
« Reply #6 on: 16.12.2018 12:36:47 »
Yes it's clever  8)

Offline debugger

  • Newbie
  • *
  • Posts: 30
Downloaded 0 Bytes after several months working
« Reply #7 on: 12.08.2019 12:27:21 »
Hi
After several months working properly, today appear a problem
All of files is direct on another host and download directly by path, but when use in "External File Link" field, doesn't show size on Size field automatically after save and when an user clicks on download button, appears 0 Bytes file for download

I change name of directory same before but no work


Best Regards


Joomla! 3.9.10
jDownloads 3.2.64
Cpanel
Database Version    10.2.18-MariaDB-cll-lve
Database Collation    latin1_swedish_ci
Database Connection Collation    utf8mb4_general_ci
PHP Version    7.2.12
Web Server    Apache
WebServer to PHP Interface    litespeed
GZip Enable
Folder Writable
post_max_size    128M
upload_max_filesize    256M
.htaccess enable

Offline ColinM

  • Moderator
  • *
  • Posts: 3.975
Re: Downloaded 0 Bytes
« Reply #8 on: 12.08.2019 14:51:44 »
Hi
jD has no way of knowing the size of a file on an external site.  You need to fill  in File Size and File Date when you create/edit the Download. 
If you are creating/editting Downloads in the front-end then in the appropriate User Groups settings -'Group Creation/Editing Setting' tab you need to ensure File Size and File Date tick boxes are ticked.
ColinPS the size is just a guide for the user.

Offline debugger

  • Newbie
  • *
  • Posts: 30
Calculate File Size Automatically
« Reply #9 on: 13.08.2019 11:58:17 »
Hi
jD has no way of knowing the size of a file on an external site.  You need to fill  in File Size and File Date when you create/edit the Download. 
If you are creating/editting Downloads in the front-end then in the appropriate User Groups settings -'Group Creation/Editing Setting' tab you need to ensure File Size and File Date tick boxes are ticked.
ColinPS the size is just a guide for the user.
Hi,

Solved fortunatly ;D

I enabled "allow_url_fopen" CheckBox on CPanel>Software>Select PHP Version>Switch to PHP Options>allow_url_fopen>On
then Calculate File Size Automatically

You can see attachment (file extension is wmv and i changed to mp4 for attachment of this post

Offline ColinM

  • Moderator
  • *
  • Posts: 3.975
Re: Downloaded 0 Bytes
« Reply #10 on: 13.08.2019 16:08:31 »
Hi
Thanks for the info  - I had forgotten!I always include it in a php.ini file on web sites and have it set in my XAMPP test sites!!
Colin