Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Filename is always "data" in DB #5

Open
Kotoriii opened this issue Jan 8, 2018 · 1 comment
Open

Filename is always "data" in DB #5

Kotoriii opened this issue Jan 8, 2018 · 1 comment

Comments

@Kotoriii
Copy link

Kotoriii commented Jan 8, 2018

Hey there!

Great add-on! However, when I save a document (docx or pdf) that goes to my Ruby on Rails Backend + DB (with the help of Paperclip), no matter what, the file name will ALWAYS be data. So, when I download the file, it is always unformatted. I always need to manually add the extension (say, data.docx) to the file for it to open in the proper program. Any idea on why this is happening? I tried customizing the filename in the model, but it will still always save as filename data.

Cheers

@Kotoriii Kotoriii changed the title Filename is always data in DB Filename is always "data" in DB Jan 8, 2018
@rmachielse
Copy link
Owner

Hi @Kotoriii

You're right about that, as the file is currently serialized to base64 the file name is lost.
Although it might be possible to replace "data" with the filename in the update function, but I haven't tried that yet.

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