• Resolved jaclynmb

    (@jaclynmb)


    I don’t know if anyone else had this problem, but underneath all of documents, the text for file size and file type always read as unknown:

    (Download, Unknown).

    I partially resolved the issue; I replaced the line of code reading:

    $dltext = str_replace( "%SIZE", gde_format_bytes( $status['fsize'] ), $dltext );

    with

    $dltext = str_replace( ", %SIZE", $status['fsize'] ), $dltext );

    Now, all of my documents show the appropriate file type, but I have removed file size:

    (Download, PDF)

    I messed around with a few different options for displaying the size, but what I came with either displayed “%SIZE” after file type for everything, caused a fatal error, or left a blank space. I chose the blank space, but I would still like to display file size if anyone has a suggestion. My website is growingwildnyc.org.

    https://www.ads-software.com/plugins/google-document-embedder/

Viewing 1 replies (of 1 total)
  • Plugin Contributor danlester

    (@danlester)

    Thanks for the report.

    First of all, you shouldn’t need to change the code to adjust this – you can just remove ‘%SIZE’ from the ‘Link Text’ settings in the GDE Settings page.

    Anyway, I believe the file type will be ‘unknown’ if the plugin is unable to fetch the file via HTTP. This is probably quite likely when the file is on the same server as the website, just due to the way that most servers are configured.

    As far as I can tell, this has always been the case with this plugin. It’s not currently under major development – I’m maintaining it as much as possible to keep up with WordPress changes etc, so I probably won’t be able to change this in the near future, but will take a look if I can.

    Thanks again for posting here.

    Dan

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying 'unknown' for file type and file size’ is closed to new replies.