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

Uploading multiple images with same image name doesn't work #1855

Closed
take opened this issue Jan 31, 2016 · 3 comments
Closed

Uploading multiple images with same image name doesn't work #1855

take opened this issue Jan 31, 2016 · 3 comments
Labels

Comments

@take
Copy link

take commented Jan 31, 2016

Ideal behavior

Maybe an automatical image name update something omg.png, omg.png to omg.png, omg_2.png?

Current behavior

DB column value ends up like ["omg.png", "omg.png"], but only the first image is actually uploaded.
Same thing happens when I use the unique filename strategy(same filename but only 1 image uploaded).

BTW I found out that this happens when using iPhone to upload images :)

multiple file upload feature was added in #1481

@take
Copy link
Author

take commented Jan 31, 2016

I guess we can avoid this problem if we change store_dir from

"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"

to

"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}/#{INDEX OF THE FILE}/"

@thomasfedb
Copy link
Contributor

This is definitely an issue that I want to look into closely.

@connorshea
Copy link
Contributor

#2029 might be a duplicate of this, or at least a similar problem? @take any more info you can provide?

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

Successfully merging a pull request may close this issue.

4 participants