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

Insert assets with title instead of id #64

Open
saturnflyer opened this issue Apr 24, 2012 · 3 comments
Open

Insert assets with title instead of id #64

saturnflyer opened this issue Apr 24, 2012 · 3 comments

Comments

@saturnflyer
Copy link
Member

Every time I insert an asset I use the title. The titles rarely change if ever and the id is completely arbitrary and unhelpful information.

Instead of inserting

<r:assets:image id="123" />

it should be

<r:assets:image title="my-awesome-image" />
@ghost
Copy link

ghost commented Apr 25, 2012

hmm. i think i prefer it being something that is not user editable; perhaps filename. what happens when you have two assets with the same filename and/or title?

@saturnflyer
Copy link
Member Author

My motivation is that it uses something that makes sense to the user. The ID is of absolutely no value when you want to know what image it is.

If it uses filename, that's fine, as long as I understand it AND as long as we actually show that filename somewhere

@SamWhited
Copy link
Member

Right now the filename isn't unique and find_by_asset_file_name will return the first one. While it would be easy enough to validate the uniqueness of the filename, the user can still change it by uploading a new file so it kind of defeats the point.

EDIT: See commits below for example. Right now it is extremely confusing if there are multiple files with the same name.

EDIT 2: Committed the cardinal sin of Git and force overwrote some history. The third commit has everything (first two aren't in the tree anymore).

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