Comments (2)
I modified the set_papermill_inline_js method in form_builder.rb to get this to work. I changed the following line from:
file_types: "#{ options[:images_only] ? '*.jpg;*.jpeg;*.png;*.gif' : '' }",
to:
file_types: "#{ options[:images_only] ? '*.jpg;*.jpeg;*.png;*.gif' : '*.*' }",
It now works just fine.
I'm on a Mac, so not sure if this was an OSX specific issue or not. Let me know if there is some other way I should have fixed this - perhaps a config setting that I missed.
from papermill.
I just investigated this. Seems like a design bug, the error you get has nothing to do with SwfUpload and the file_types settings (who just set constraints on the file browser).
The problem lies with Paperclip, who doesn't support inherited settings.
The ImageAsset < PapermillAsset Paperclip validation creeped the superclass (PapermillAsset) validation. (at least for the demo)
Basically, looks like you can only have only one asset class used with Papermill :/
If you don't need the server side validation and can go with SwfUpload filters, you can just use :images_only or :swfupload => { :file_types => ".jpg;.xls" } for a narrower filtering.
I've included your fix anyway, maybe there is a SwfUpload side effect in your case?
Released in next gem within a few hours.
from papermill.
Related Issues (16)
- Problems on windows... HOT 5
- Uncaught exception: undefined method `has_attached_file' HOT 5
- Formtastic 0.9.10 & Rails 2.3.8 HOT 2
- Conflict with Facebox in DOM ID & Jquery Delete not working in form HOT 1
- Any plans for a Rails 3 branch? HOT 1
- rails3 HOT 1
- Papermill depends on mime-types >= 1.16
- Index name too long for MySQL HOT 5
- Unable to edit with papermill HOT 4
- Multiple words model name HOT 1
- File permission issue HOT 2
- Getting exception: undefined method 'sort_papermill_path' HOT 1
- Getting (Can't convert true into String) HOT 1
- Getting exception only with PDF file HOT 1
- Thumb regeneration every time the page is requested HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from papermill.