WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to upload document/associate with post? (5 posts)

  1. deko
    Member
    Posted 7 years ago #

    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?

  2. Chris_K
    Member
    Posted 7 years ago #

    Is /home/postpo5/public_html/postpositive/wp-content/uploads
    writable by your web server?

  3. deko
    Member
    Posted 7 years ago #

    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?

  4. Chris_K
    Member
    Posted 7 years ago #

    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.

  5. deko
    Member
    Posted 7 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.