Coder Social home page Coder Social logo

tors / jquery-fileupload-rails-paperclip-example Goto Github PK

View Code? Open in Web Editor NEW
153.0 153.0 142.0 137 KB

An example rails application that uses the jquery-fileupload-rails and paperclip gems to upload files.

Ruby 95.91% JavaScript 3.05% CoffeeScript 1.04%

jquery-fileupload-rails-paperclip-example's People

Contributors

tors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-fileupload-rails-paperclip-example's Issues

multiple file upload

Hello!
I tried to change the code in order to be able to upload multiple files but I did not succeed in it.
I changed:
<%= f.file_field :upload , multiple=>true%>
but after clinking on "Start upload" it could not upload the files and showed me errors.

Could you tell me what I should change?

Many thanks in advanced.
Cheers,
Katja

Add new column(s) in Model

I'm asking how to add new column(s) in Model "uploads"? I tried to add one line in db/migrate/XXXX_create_uploads.rb:
t.string "upload_user"

and do "rake db:migrate", however, it seems not working. Anyone could help?

File Upload Not Working Status 422 (Unprocessable entity) (Not my validations)

I'm trying to use the gem with paperclip. Everything seems to be working fine except that I'm getting Error OK as the status after I try to upload it. Below is what the JS console says when I try to upload it. Also a link to a gist I made with the model, controller, and form partial.

I'm trying to upload a 12.57 KB png image so it should not be my validations tripping it up.

Please help! I've posted this on stack overflow and the support forum and haven't been able to fix it on my own.

https://gist.github.com/spq24/5000772

POST http://localhost:3000/pins 422 (OK) jquery.js:8476
send jquery.js:8476
jQuery.extend.ajax jquery.js:7931
send jquery.fileupload.js:659
$.widget._onSend jquery.fileupload.js:720
(anonymous function) jquery.ui.widget.js:100
newData.submit jquery.fileupload.js:759
$.widget._startHandler jquery.fileupload-ui.js:517
(anonymous function) jquery.ui.widget.js:100
handlerProxy jquery.ui.widget.js:398
jQuery.event.dispatch jquery.js:3046
elemData.handle jquery.js:2722

Form Data with Upload

I want to insert a category field with each photo and want to select the category from the drop down, which will be displayed within the table when the image preview is done before the actual upload.

"cannot load such file -- less"

Hi, trying to run it and getting an error:

LoadError in Uploads#index

Showing /rails/jquery-fileupload-rails-paperclip-example/app/views/layouts/application.html.erb where line #5 raised:

cannot load such file -- less
(in /rails/jquery-fileupload-rails-paperclip-example/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #5):

2:
3:
4: <title>JqueryFileuploadRailsExample</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8:

Inserting Foreign Keys

Hello I am trying to include a foreign key in the upload.

I have a model properties and I want to include a property_id when it uploads.

I have made the migrations to the database but I don't know how to include it. I have tried making a hidden field and passing the value through there but it comes back with a server error. I have also tried to include it in the def to_jq_upload inside the model but no luck.

Plugin not firing

Hi,

I'm trying to use the example code in here on my project, but unfortunately, the plugin doesn't seem to be initializing properly. I'm not getting any console errors, and manually running the JS in the console seems to work just fine, other than that nothing happens. I'm afraid I'm totally stumped - do you have any clue what might be going on here?

http://vocalem-beta.com/files

Tags are not all closed

The markup in this app will not work with strict XHTML rendering.

Specifically you have some tags that are not self-closing such as "br" and "input".

error messages

Hey once more!
I have found as well some error-variables in your index.html.erb. I need to have my error messages(in validation) associated to the 'error' key in your json response
Could you please give me a hint how to use different error-messages and how to build them into a code?

I have tried this thing in a controller but it didnt work.
render json: {error: @upload.errors.full_messages}, status: :unprocessable_entity
render json: {error: @upload.errors.full_messages}, status: 422
I guess I need to change a javascript in index.html.erb

Thanks

ChunkFile dont regroup after upload

I install your application for test the upload file , that's work but when I use the Chunk Option, and i display my upload I see Two files upload and not only one. How i can regroup my file ?

Multiple file selection error

Whenever changing <%= f.file_field :upload %> to <%= f.file_field :upload, :multiple => true %> to support multiple file selection it is giving error.

Select files to upload file button is not selecting file on production

Hello i used your sample code and converted all haml files to erb code in rails 5 and it is working on my development but when i deployed on server or production the select file upload button pops to browse file but when is select file and click open, the file is not getting open i think this is because of "<%= content_tag :body, data: { controller: controller_path, action: action_name } do%>" in application.html.erb and you used this code"= content_tag :body, data: { controller: controller_path, action: action_name } do" in haml; but it is working on development rather in production can you help me to resolve it?

"Add files" needs double click in IE10

The "Add files" button needs double click on Internet Explorer 10. All other buttons works perfectly.

The "Add files" button woks perfectly also in IE8, Safari, Chrome and Firefox.

Way too much going on for an example

Thank you very much for taking your time to share this example.

The issue is it's way too complicated. There's too much going on in this example that has nothing to do with jquery fileupload or paperclip. There's all sorts of stuff that distracts from the example at hand.

Imagine if someone asked you how to bake an apple pie and you started describing how to create a universe.

As you can see by all the issues, it's better to keep an example simple with no extra fluff. An example should contain the bare minimum to get the point across.

Thank you again.

button dependencies

Hello!

I am modelling your index.html.erb to fit my needs.
Firtsly, i want to get rid of "start" buttom in order to prevent single-file upload (I dont want it), but it seems that "start upload"(multiple upload)-button is on "start" button dependent and I could not find how to modify the script in order to get rid of "start"-buttom but to keep the functionality of a "start upload" -button.

Can you give me some hints how to get rid of those dependencies?

Thank you.
Cheers, Katja

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.