mercredi 18 mai 2016

Why I cant upload to public_html in Laravel 5.1?

I am using shared hosting and I have 2 folders. First one 'laravel' other 'public_html'. I want to upload photo to /public_html/uploads/products/ . But when I uploaded photo, my photo uploading into laravel/public/uploads/products. How can read from there or how can upload into public_html

My uploads path code:

class UploadPaths
{
    public static $uploadPaths = array(
        'products_photos'     =>'/uploads/products_photos/'

    );
    public static function getUploadPath($path)
    {
        return public_path().self::$uploadPaths[$path];
    }
}

And href codes at below:

<a href="/../laravel/public/uploads/products_photos/" target="_blank" class="file-alert alert-info"></a>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire