• Resolved ssgupta

    (@ssgupta)


    On a multisite there is a path error in that the file upload path shows site/xx twice – site/xx/site/xx

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ssgupta

    (@ssgupta)

    Also, I guess, it doesn’t supports .pdf file upload in that it converts a .pdf file to image on upload.

    Plugin Author Chad Butler

    (@cbutlerjr)

    Based on the information in both of these posts, it sounds to me like you have another process that hooks into file uploads. My suggestion would be to start by testing without any other plugins activated.

    What leads me to this conclusion is your second post. The plugin doesn’t convert anything. In fact, it doesn’t really manage the upload at all – that’s all WP functions. The plugin is just using those functions (the same as the media uploader) to save the file as an attachment (same as uploaded media) and retrieve the post ID to save in the user meta field.

    So if your files are getting converted, that would indicate something else is involved in the process besides just WP-Members and WP.

    If that’s the case, that may also affect the file upload path. The plugin relies on the information provided by WP to determine the file path. When a file is uploaded, it applies WP’s upload_dir filter to append the necessary file path for the current user to the WP file path. upload_dir passes WP’s upload directory parameters to the filter, which the WP-Members’ function uses to determine where to apply the user’s file upload.

    The explain that process, it adjusts WP’s ‘path’ to what WP has for ‘basedir’ plus the the WP-Members directory and the user ID.

    So it sounds like by the time the filter is applied, WP’s ‘path’ and ‘basedir’ are the same, thus creating a repeated structure in the path. That ordinarily wouldn’t be the case, which suggests that there may be another plugin involved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘File Uploads’ is closed to new replies.