opened
sulthanallaudeen
username_0
I am using US Standard

And here's my Code

$s3 = AWS::get('s3');
$s3->putObject(array(
    'Bucket'     => 'Mybucketname',
    'Body' => Input::get('name'),
));

While i am trying to upload, it is giving me the error
Issue while uploading in US Region
issue
created
jeremeamia
username_1
What does your config look like?
comment
created
sulthanallaudeen
username_0
here is my config look like

<?php

return [
    'credentials' => [
        'key'    => 'yy',
        'secret' => 'xx',
    ],
    'region' => 'us-east-1',
    'version' => 'latest',

    // You can override settings for specific services
    'Ses' => [
        'region' => 'us-east-1',
    ],
];

My Location is US Standard
comment
created
sulthanallaudeen
username_0
Also this is my code

$s3->putObject(array(
    'Bucket'     => 'greenhoppingbucket',
    'Key'        => '1231',
    'Body' => Input::get('name'),
));

In the bucket i can find a file named as 1231 is created by my real file.. is not getting stored, which i had as 'body' .. 
What might be the issue.. help pls
comment
created
jeskew
username_2
@username_0 So you're no longer getting the "Please send all future requests to this endpoint" error, but an empty object is created in your bucket?
comment
created
sulthanallaudeen
username_0
Yes in my bucket an empty object is created always
comment
created
sulthanallaudeen
username_0
$s3 = App::make('aws')->get('s3');
$s3->putObject(array(
    'Bucket'     => 'greenhoppingbucket',
    'Key'        => 'somevalue',
    'Body'        => Input::get('name'),
    'SourceFile' => Input::get('name'),
));

In the above code, the output is , i am getting 'somevalue' as object created in bucket. but the files is not stored in the bucket.
comment
created
jeremeamia
username_1
What is the value of `Input::get('name')`? You must be sending an empty string to S3.

Also, you shouldn't be using both `Body` and `SourceFile`.
comment
created
sulthanallaudeen
username_0
In the jquery request i am getting the image by 

var files = document.getElementById ("upload").files;
var file = files[0];
$.ajax({
                method: "POST",
                url: "imageUpload",
                data: {
                    'name': file.name,
                    'type': file.type,
                }
            })
            .done(function(msg) {

And inside the controller i am getting it by 

Input::get('name');

note  : if i return `Input::get('name')` inside my controller, i can see the image's name over there..
comment
created
jeskew
username_2
So `Input::get('name')` is a file path on the server?
comment
created
jeskew
username_2
Based on the information available, it sounds like you're sending the file name to the server. You'll need to send the entire file unless the path being sent is on the server, not the client.

Please feel free to reopen if you have any questions or concerns.
comment
closed
jeskew
username_2
issue