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

Uploads of office documents #127

Open
oluwayetty opened this issue May 9, 2016 · 3 comments
Open

Uploads of office documents #127

oluwayetty opened this issue May 9, 2016 · 3 comments
Labels

Comments

@oluwayetty
Copy link

oluwayetty commented May 9, 2016

I can only upload pdfs but can't upload doc, excel sheets, etc.
Is there a reason why?

@orlando
Copy link
Collaborator

orlando commented May 16, 2016

Hello @andela-ysanni.

This should be possible using the accept attribute in your model

Class User < ActiveRecord::Base
  has_attachment :photo, accept: [:jpg, :png, :gif]
  has_attachment :id_verification, accept: [:pdf, :doc, :xls]
end

Let me know if that works

@oluwayetty
Copy link
Author

@orlando I've actually tried that but when uploading,it returns an error: "Invalid file format"

@scott
Copy link

scott commented Oct 11, 2016

This should be labeled "Bug"

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

No branches or pull requests

3 participants