Can I have a plain text media file?

  • Unknown's avatar

    I have a plain text document (a C program I wrote in relation to a project I’m talking about on my blog) which I’d like to upload so that I can reference it on my blog. Plain text is not among the media types listed. What would be the best way to make that program available to my readers?

  • Hi there,

    .txt files cannot be uploaded to WordPress.com, no. As it’s possible to embed malware inside a .txt file we don’t allow that file type for security reasons.

    How much code are we speaking of? We have a code block which lets you post your source code directly in your post or page:

    Code Block

    Else you can also create a Gist on GitHub, and link to or embed that on your blog: https://wordpress.com/support/gist/

  • Unknown's avatar

    One can embed malware in ANY document type–as well as the code blocks you mentioned–just as easily as one can into a .txt file. It’s text, exactly the same as goes into a post! Similarly, putting the text on github makes it no less a potential threat. So that’s the silliest excuse I’ve heard in awhile for a non-feature.

    That said, I have only about 1200 lines of C code and its main purpose is to illustrate and simulate some science. What I’ll do is create a post that discusses the science and append my program to it after a more tag, using

     around my code to avoid malignant formatting. That way, the casual reader won't need to see the program, but it will be there for anyone who wants it.
    
    I would vastly have preferred to upload the code so that my post could just link to it.  Doing it this other way requires pointless effort, on my part and on my readers', and having to do it that way in no way mitigates the claimed problem with allowing text uploads.
  • Unknown's avatar

    Urp. Sorry about that! I typed the pre tag literally, forgetting that it would be applied to my text!

    Here’s the corrected reply:

    One can embed malware in ANY document type–as well as the code blocks you mentioned–just as easily as one can into a .txt file. It’s text, exactly the same as goes into a post! Similarly, putting the text on github makes it no less a potential threat. So that’s the silliest excuse I’ve heard in awhile for a non-feature.

    That said, I have only about 1200 lines of C code and its main purpose is to illustrate and simulate some science. What I’ll do is create a post that discusses the science and append my program to it after a more tag, using pre tags around my code to avoid malignant formatting. That way, the casual reader won’t need to see the program, but it will be there for anyone who wants it.

    I would vastly have preferred to upload the code so that my post could just link to it. Doing it this other way requires pointless effort, on my part and on my readers’, and having to do it that way in no way mitigates the claimed problem with allowing text uploads.

  • The topic ‘Can I have a plain text media file?’ is closed to new replies.