How to upload file to amazon using filemanager (Responsive Filemanager) in tinymce

664 views Asked by At

How can i upload my file to amazon in filemanager (responsive filemanager) and encrypt it once the image is uploaded.

when using this setup it only save all image on my local folder, any thoughts in this matter?

and when i change my 'curent_path' to 'https://s3-us-west-2.amazonaws.com/dir/subdir/directoryhere it give me error on php

below is my sample code setup,

if (!empty($_SERVER["SERVER_NAME"])) {
    $host = $_SERVER["SERVER_NAME"];
} else {
    $host = "localhost";
}
$urlParts = explode(".",$host);
$subdomain = $urlParts[1];

if ($subdomain == "tvms") {
    $link = "https://s3.amazonaws.com";
    $bucket = "tvms-live";
} else {
    $link = "https://s3-us-west-2.amazonaws.com";
    $bucket = "tvms-uat";
}



define('USE_ACCESS_KEYS', false); // TRUE or FALSE

define('DEBUG_ERROR_MESSAGE', true); // TRUE or FALSE




$config = array(

    //'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"). "://". @$_SERVER['HTTP_HOST'],
    'base_url' => $link,


    'upload_dir' => '/' . $bucket . '/acvr/uploads/hostedimages/',

    'current_path' => '../source/',

    'thumbs_base_path' => '../thumbs/',


    'mime_extension_rename' => true,



    'ftp_host'         => false, //put the FTP host
    'ftp_user'         => "user",
    'ftp_pass'         => "pass",
    'ftp_base_folder'  => "base_folder",
    'ftp_base_url'     => "http://site to ftp root",
    // Directory where place files before to send to FTP with final /
    'ftp_temp_folder'  => "../temp/",

    'ftp_thumbs_dir' => '/thumbs/',
    'ftp_ssl' => false,
    'ftp_port' => 21,

    /* EXAMPLE
    'ftp_host'         => "host.com",
    'ftp_user'         => "[email protected]",
    'ftp_pass'         => "pass.1",
    'ftp_base_folder'  => "",
    'ftp_base_url'     => "http://host.com/testFTP",
    */


    'multiple_selection' => true,

    'multiple_selection_action_button' => true,



    'access_keys' => array(
        'key' =>'AAKJSKDFIOUEJKNRWELNQWEWQE',
        'secret' => 'opisdfj2j3kl2n43249sdfijadsf890324'
    ),

heres the error message

enter image description here

1

There are 1 answers

0
MicBehrens On

This plugin is not meant to work with AWS S3 this way. The defintions of access_keys in the plugin is only internal, and have nothing to do with AWS IAM.