WordPress.org

Ready to get started?Download WordPress

Forums

Amazon S3 for WordPress
option_siteurl gets wrong url when multisite with subdomain and su (2 posts)

  1. ganchiku
    Member
    Posted 2 years ago #

    Hi, I'm using this plugin and it works very good, but I have encountered a tricky problem.
    I have installed WP with multisite and it is on subdomain. Plus, the WP is working on subdirectory. Like:

    http://example.com/blog/
    http://foo.example.com/blog/

    The main blog has no problem to upload s3, it dug s3://bucketname/blog/wp-contents/2011/11/xxxx.jpg .
    But the sub blog is different. It should be uploaded to s3://bucketname/blog/files/2011/11/xxxx.jpg , but it dug s3://bucketname/blog//blog/files/2011/11/xxxx.jpg .
    I looked into the code, and found the wrong code, but it seems the code did it intentionally, and I don't understand why.
    In class-plugin.php, why this filter option_siteurl before getting $uploadDIr. It mess the information. In line 173,

    add_filter('option_siteurl', array(&$this, 'upload_path'));

    I also checked upload_path function, but it does not make any sense to filter option_siteurl to upload_path.

    After removing the add_filter line, it worked like a charm, but I think there should be some reason to filter option-siteurl. It saids "figure out the correct path to upload to, for wordpress mu installs", but it does make incorrect path...
    Hmm....

    http://wordpress.org/extend/plugins/tantan-s3/

  2. EduardoG
    Member
    Posted 2 years ago #

    Hello,

    I have the same problem. did yuo have solve the problem?

    I`m not developer, i´m a dummy. But I thinl the problem is the server configuration. I tried a cname redirect but the files was uploaded to de same server.

    My wordpress is multisite and have a wilscards to create subdomines, and i think this is de problem

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags