Chrizzmeister's avatar

Will a model called File give me issues?

Hi,

Maybe a dumb question but i am building a little app for File uploads. The obvious name for my File model would be File, but is this a good idea since there are File helper functions etc. If it's a bad idea what should i call it?

0 likes
4 replies
Snapey's avatar

I would probably avoid it.

What to call it instead? What does it relate to. Sure its a file, but is it a Document or maybe an Image or maybe a FileAttachment

J_shelfwood's avatar

I have to agree with @Snapey here, best to name it more specifically. I've had an issue with a model called "log" before which made me realise that it is actually better to name things more specifically for readability.

There's actually a facade called File so it wont work.

Chrizzmeister's avatar

@Snapey its a dropbox like app , so it can be of multiple types. So FileAttachment seems like a ok choice. Was thinking about UploadedFile

Snapey's avatar
Snapey
Best Answer
Level 122

or just 'Upload' ?

Please or to participate in this conversation.