Yii Framework Forum: Make image upload handling easier - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Make image upload handling easier Rate Topic: -----

#1 User is offline   robsch 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 14-February 13
  • Location:Austria

Posted 22 January 2015 - 11:22 AM

I just came across image uploading and displaying. I used Kartiks fileInput widget (http://demos.krajee....tails/fileinput) which is already helpful. Also the UploadedFile class is already helpful.

Still I hate it. There's so much code with uploading files and it is always the same mess. Especially with images. But I think it could be simpler if the framework supports it somehow.

Thing about an avatar or so. Often there is an image that needs to be managed by a user. If you want to implement it you have to code a lot. For creation, updating and deletion. Always the same thing. The file has to be stored somehwere or deleted or replaced. A field for a file name is required in a db table and you need something for the view (widget) for managing or viewing.

Aren't there many projects that needs that? I think so. So it would be quite helpful if the Yii framework could provide more support to handle this.

Maybe the ActiveRecord needs something. Or a Behaviour could help. What do you think? Does that make sense? Just think about how a developer could realize an avatar easily in his or her project.

It is not the same but for example the Yii app templates are also really, really helpful for the whole login/account stuff. I'm quite happy that this is already there and I don't have to implement this for each project by myself. And the avatar thing is somehow similar: a (of course less) complex functionality that has to be coded with each occurence. I would be happy if there would be something in the framework that makes life easier.

So if you just have nothing to do ... ;) think about it and make some comment please!

Thanks!
Robert
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users