Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Content-type not being stored #31

Open
rhelsing opened this issue Sep 18, 2017 · 1 comment
Open

Content-type not being stored #31

rhelsing opened this issue Sep 18, 2017 · 1 comment

Comments

@rhelsing
Copy link

I may be doing something wrong as I am just getting started with this library but the examples show the identifier being saved as 'file.png' but mine is always a digit '45838' without the extension. Is this a property of OID or did I configure it incorrectly? When I run model.obj.content_type I get nil. Is there something extra I need to do for that to work properly? Either when saving the file or in my uploader class?

@TheKidCoder
Copy link
Contributor

What is stored on the model is a pointer ID to the large object in postgres. This gem doesn't make an effort to keep filename or content_type because it just stores the bytes in postgres. If you want to maintain those qualities I would suggest saving them to the model itself.

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

No branches or pull requests

2 participants