Skip to content
Permalink
Browse files

Updated to use the AWS SDK v3, which happens to be incompatible with …

…HHVM at this time
  • Loading branch information...
millinon committed Dec 14, 2015
1 parent 7fe003c commit ccf637c9f19935d8a18d8f58f83c6bf79c6cba59
Showing 1,345 changed files with 100 additions and 226,549 deletions.
@@ -1,2 +1,2 @@
composer.lock
*.ini
*.swp
@@ -1,6 +1,12 @@
# jump.wtf
A link shortening and file hosting service using AWS resources through PHP / Hack

This branch is an attempt to migrate to the newer version of the AWS SDK. At this time, when HHVM tries to execute `aws.phar` as provided by Amazon, it generates this error:
`Fatal error: syntax error, unexpected T_YIELD in phar://aws-3.11.5.phar/Aws/S3/S3Client.php on line 562`
which appears to be a problem with how HHVM interprets the `yield` keyword. This is probably related to [HHVM#538](https://github.com/guzzle/guzzle/issues/538).

This branch should be merged into master once HHVM is fixed.

---

## Introduction
@@ -0,0 +1,7 @@
[primary-profile]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY

[url-profile]
aws_access_key_id = ANOTHER_AWS_ACCESS_KEY_ID
aws_secret_access_key = ANOTHER_AWS_SECRET_ACCESS_KEY
@@ -1,13 +1,15 @@
<?hh

require_once('api.hh');

class jump_api {

public static function genUploadURL($input): ?array {

$private = isset($input["private"]) ? $input["private"] : false;
$content_type = isset($input["content_type"]) ? $input["content_type"] : false;

$s3client = mk_aws()->get('S3');
$s3client = awsHelper::s3_URL_client();
$tmp_id = uniqid(); // is this unique enough for a temporary ID shared between (potentially) multiple servers?

$bucket = ($private ? aws_config::PRIV_BUCKET : aws_config::PUB_BUCKET);

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ccf637c

Please sign in to comment.
You can’t perform that action at this time.