Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

[Q] one image folder for frontend and backend #25

Description

@adriandrozdz

I start to deploy an app based on Yiinatializr-intermediate and it's been working fine but I've come across this issue.
Backend users will add articles and upload images. I created folder upload in site

directory do I have
upload
frontend
common
backend

I'm able to upload pictures to upload folder from backend app but I can't display it in frontend

<?php echo CHtml::image(Yii::app()->basePath . '/../upload/images/medium/' . $sport[0]->primaryPicture, ''); ?>

return no image
in Firebug console I get

"NetworkError: 404 Not Found - http://adrenalina.vhost/home/webadmin/www/html/adrenalina/upload/images/medium/2745-5011639458_374e174cdd_o.jpg"

The image is of course there

<?php echo Yii::app()->basePath; ?>

return my basePath

/home/webadmin/www/html/adrenalina/frontend 

Hope this could help you help me :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions