Support » How-To and Troubleshooting » [Resolved] How to upload document/associate with post?

[Resolved] How to upload document/associate with post?

  • I’m getting an error when trying to upload a PDF file in version 2.1.2 — I’m using the Manage/Posts tab, just below the post box… Upload button

    Error message:

    The uploaded file could not be moved to /home/postpo5/public_html/postpositive/wp-content/uploads.
    Warning: Cannot modify header information - headers already sent by (output started at /home/postpo5/public_html/postpositive/wp-admin/admin-functions.php:1879) in /home/postpo5/public_html/postpositive/wp-includes/functions.php on line 1219

    Here is line 1219 in finctions.php:

    header('Content-Type: text/html; charset=utf-8');

    I closed out of everything and tried again – no luck.

    I understand that the headers cannot be modified once an upload is initiated, by what is outputing header info before attempting to upload?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is /home/postpo5/public_html/postpositive/wp-content/uploads
    writable by your web server?

    Apparently, the folder needs 777 perms (I had 766).

    I was thinking the Upload feature wd insert the file in the database (?) but it looks like it’s just a mechanism to get the file on the server and insert a link into the editor.

    I’m not sure this adds much value, especially considering I need 777 perms on a public folder to use it.

    Am I missing something?

    Physically, the file is going to wp-content/uploads.
    There’s also a db record made into your Posts table that associates that file/upload with the post.

    As for the perms, not sure what to say. To some extent we’re at the mercy of our hosts (or ourselves if self-hosted). For example, I and many don’t need to do 755 there, but seems just as many do.

    I see. Thanks for the clarification

    The benefit I was looking for was consolidation of documents and posts in a backup.

    I think manually linking to docs is just as easy…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How to upload document/associate with post?’ is closed to new replies.