Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] Common image folder for frontend and backend #14

Open
adriandrozdz opened this issue Jan 17, 2014 · 1 comment
Open

[Q] Common image folder for frontend and backend #14

adriandrozdz opened this issue Jan 17, 2014 · 1 comment

Comments

@adriandrozdz
Copy link

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. Can you tell me if you have some ideas where to create common image folder and how to use it?

[UPDATE]
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 is helpful

@tonydspaniard
Copy link
Owner

The way I do it is to create a frontend folder and reference it from the backend location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants