10446 Posts in 2223 Topics by 1719 members
| Go to End | Next > | |
| Author | Topic: | 2110 Views |
-
Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 2:44am
Hi Cheese!
Ok, I get the HTTP Error on error. And to debug it, I have put die("hello"); in the first line of "public function uploads3() "
BUT, it still gives me the "HTTP ERROR". I am kinda lost on where to check next. This is just a test page to make sure the S3 is working.
Any idea on how I can debug this further?--changed the name of my buckets and auth codes below.
Here is my code
in uploadify folder _config I have<?php
S3File::set_auth("xxxxxxxxxx", "xxxxxxxxxxx");
S3File::set_default_bucket('media.mydomain.com');
Director::addRules(10, array(
UploadifyUploader::$url_segment => 'UploadifyUploader'
));and my test page code has:
<?php
class TestPage extends Page {public static $db = array(
);public static $has_one = array(
'S3Test' => 'S3File'
);
public function getCMSFields() {
$f = parent::getCMSFields();
$f->addFieldToTab("Root.Content.S3 Storage", $s3 = new S3UploadField('S3Test','Send a file to Amazon S3'));
$s3->setVar('s3bucket', 'media.mydomain.com');
return $f;
}
}
class TestPage_Controller extends Page_Controller {
public static $allowed_actions = array ();
public function init() {
parent::init();
}
} -
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:21am
You can go to S3Uploadfield.php::uploads3() and put die('hello') statements at various places in the function to see what line is causing the error.
-
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:22am
Yeh I did that,
---public function uploads3() {
die('hello');but it doesnt throw the error. Not sure why?
-
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:22am
At first glance, this doesn't look like a valid bucket name "media.mydomain.com"
Are you sure about that one?
-
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:23am
Sorry, I missed that in your initial post. Did you put that in S3UploadField.php or S3Uploader.php?
-
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:25am
Yeh, media.mydomain.com is a valid bucket. I have used it with other apps and uploaded to it. Its how you do a s3 cname setup.
S3UploadField.php
-
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:27am
Just tried also S3Uploader.php but its still the same, not catching the die() in the first line of uploads3
Oddly enough, it appears to be uploading (progress bar goes up to 100%, then throws its http error.
John -
Re: Debugging Uploadify S3UploadField::uploads3()

31 August 2010 at 3:28am
I also changed the bucket to one of my regular named buckets and it's still doing the same thing.
John
| 2110 Views | ||
| Go to Top | Next > |

