Having problems with my RoR app :(
Using Rails + cloudinary + active text for my blog !
When I upload attachement with a submit button, everything work good.
But when i drag and drop a image, it does not load :
image
a grey bar appears on the image
I installed mini magic and co, but nothing change
Error :
error in console
Any suggestion ?
Related
Can anyone advise on this problem? No clue why uploaded image doesn't appear:
Things to check:
When you upload the image, check the rails log and see if there were any errors during the upload
Check the actual file in the file system or S3 depending on where you are trying to upload
Get the image URL from rails console and load it directly by using the URL
I do not found any tutorial for Rails 4, jQuery File Upload + Progress Bar. Someone can i help me?
I need to upload a file(.xml), store it in my disc and show to the user the progress bar. How can i do it?
I'm trying do it since last week. :[
I am having trouble with getting uploaded images to show on a Cloud 9 rails project. When I run rails and use the included test browser I simply get a blue question mark. Calling images via their url works.
I have checked the following for help and they were unable to assist me:
How to add a image to cloud9?
Here is the code so far:
https://jsbin.com/nuduco/edit?html,output
Here is the directory structure:
Folder directory
Cloud9 IDE loads page previews over https by default. Be sure the image is being loaded over https or else you'll get a cross-origin issue. Alternatively, you can pop the preview out into a new tab and then change the preview to http.
I'm using carrierwave to upload an image, this works fine up to now.
What i want to do is show the preview of the file to be submitted on the form after having selected the image.
At the moment the code I have is showing the previous image.
<%= image_tag(#book.cover_url(:thumb)) if #book.cover_url %>
how do I show the selected image rather than the image already uploaded?
You don't.
And that has nothing to do with Carrierwave but rather with the fact that the image is not yet sent to the server by your browser so no part of the Rails stack is coming into play here.
What you need is a way to access the image inside the <input type="file"> and display it to the user.
This is possible by using the FileAPI that is part of HTML5, but it's only supported in modern browsers (Webkit/Gecko), and the API is not completely finished yet so it's kind of a changing target.
I would suggest you look into tools like plupload to upload the image to the server without submitting the form and then displaying that through JavaScript.
Try http://jasny.github.io/bootstrap/javascript/#fileinput
It has a nice solution for displaying the image without the upload.
I am uploading images to S3 storage using paperclip gem. It uploads successfully.
In my application, an user can change his profile photo. If user do the profile photo change, the new image will get uploaded successfully. The problem is the browser will show previous photo only after the upload. Only after a force refresh by the hitting ctrl + F5 will the new image display.
Note: image is uploaded using form post. I guess it's related with caching but I don't have clue where I can change my code. Please help me this out. Thanks.
What property of your image object are you using as the src of your image? If you use user.image.url (assuming that you have a User model and that the Paperclip field's called image) then the URL to the image on S3 should have a number in the querystring that acts to stop any caching so that you see the updated image immediately. For example the URL for the image should change from
http://s3.amazonaws.com/bucket/images/5/original/pic.gif?1250184309
to
http://s3.amazonaws.com/bucket/images/5/original/pic.gif?1250184348
which should stop the browser caching the image.