FinalsClub / karmaworld

KarmaNotes.org v3.0
GNU Affero General Public License v3.0
7 stars 6 forks source link

restrict filepicker upload to only certain file types #275

Closed AndrewMagliozzi closed 10 years ago

AndrewMagliozzi commented 10 years ago

https://developers.inkfilepicker.com/docs/web/#widgets-drag

Add this parameter to the filepick partial

data-fp-extensions=".pdf, .doc, .docx, .txt, .rtf, ..."

The reason for this ticket is that we don't want people uploading xls files or other unsupported file types we can't process.

charlesconnell commented 10 years ago

We switched away from this in 27a6798dae9d7ec8f95d6f94b27df5b5e89d925b because it caused us to get Evernotes in only plain text. I can only assume this is because of a bug in Filepicker.

AndrewMagliozzi commented 10 years ago

Frown. Now the issue is we get false positives for .xls files. FP allows upload but we cannot process them server-side.

What's a good solution for this?

On Jan 14, 2014, at 3:34 PM, Charles Connell notifications@github.com wrote:

We switched away from this in 27a6798 because it caused us to get Evernotes in only plain text. I can only assume this is because of a bug in Filepicker.

— Reply to this email directly or view it on GitHub.

btbonval commented 10 years ago

Anyway we can loop the FP folks into the discussion?

Clearly we did one thing as a workaround for a problem we had with FP, but that led to another problem with FP. Sounds like we might want to file an issue with them or ask them how to approach the situation.

charlesconnell commented 10 years ago

I did some experimenting and found that adding .html to the list of allowed file extensions fixed the Evernote issue. Closing ticket as fixed.

AndrewMagliozzi commented 10 years ago

Amazing!

On Jan 26, 2014, at 5:08 PM, Charles Connell notifications@github.com wrote:

Closed #275.

— Reply to this email directly or view it on GitHub.