• arustad

    (@arustad)


    I am trying to implement what is in the following link. Basically add (pdf, 2mb) after filename for media links pointing to PDFs,Docx,Zip…

    PDF Bombs

    I want go a bit further and have php\wordpress automatically add a rounded data-size attribute to the links. EG

    <a href="the.pdf" data-size:2MB>The File</a>
    //output
    The File (PDF, 2MB)

    What methods are available to accomplish that?

    TIA

Viewing 2 replies - 1 through 2 (of 2 total)
  • webdesignerchristian

    (@webdesignerchristian)

    why do you want to round your data-size?

    Thread Starter arustad

    (@arustad)

    It would be ridiculous not to round it. Three significant figures is enough.

    I got the (pdf) to work. But I still don’t know how to get the file size. But I honestly have not put much time into it, bigger fish to fry.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PDF, docx, zip… bombs’ is closed to new replies.