I have a Ruby on Rails web application that uses the Simple CMS plug-in to upload images to the app.
I've used this before. In fact, my current web application is a clone of an original application that works perfectly.
With the new app, the image itself uploads okay, but - unlike the original app - it does not automatically generate a thumbnail image.
I've isolated this down to the point where SimpleCmsImage.save is called. In the original app, this automatically does two insertions into the simple_cms_image table - one for the image itself; and one for the automatically-generated thumbnail image.
In the new app, there is only one insertion for the image, none for the thumbnail.
Does anyone have any suggestions? I'm at my wit's end to figure this one out?
Thanks in advance,
Tim
Related
I require a simple but potentially complex solution that I can't seem to find code that translates from Android for my iOS version APP.
I simply need a imageview grid such as shown here from a single web directory: https://www.youtube.com/watch?v=fIX4SnBLaZg
I have a working version on Android but can't seem to figure it out on Objective C.
My working version uses JSON to find each file in the directory and associated text, then simply adds each entry to the grid. The iOS version doesn't need to be as complicated if anyone has any examples?
Would anyone have any examples/snippets/APIs of implementing something like this into iOS?
Or even a simplified version such as only images from a directory. Simply have the thread read an entire folder from URL, file by file, and populate it in imageview's. Then once a user clicks on an image, simply view it full screen?
For your requirement you can use collection view . Please follow the below tutorial
uicollectionview-basic-tutorial
And to get images of jpg stored in bundle under folder named Images
NSArray *imagesOfjpgType = [[NSBundle mainBundle]pathsForResourcesOfType:#"jpg"
inDirectory:#"Images"];
To customize the cell to your design Please use the below code
https://stackoverflow.com/a/16579595/1142743
Also Please find sample from above tutorial which has a label below the image
https://www.dropbox.com/s/1uymyrwtx2yn9fs/RecipePhoto.zip?dl=0
I'm using the imageresizer plugin from http://imageresizing.net/.
The website i'm working on (an asp.net mvc5 application) contains some static images located in the /content/images folder in the root of the website.
The second part of the images is coming from the database through an MVC-controller. The static images are being resized without any problems, but the images coming from the database aren't being resized using this very same plugin.
I've created a controller called 'ImagesController' and mapped the url like 'images/'.
So the url could be like this;
http://localhost:55062/images/47cff4e6-8932-48dc-8baf-f328e89f3f83
When I make a request to this url i'm seeing my image correctly (in it's original size ofcourse), so no problems so far. So I've decided to add a with and height, and for testing purposes I also want to allow upscaling. So i'm making a request to the following url;
http://localhost:55062/images/47cff4e6-8932-48dc-8baf-f328e89f3f83?width=100&height=100&scale=both
The original size of the image behind this url is 2000 x 1334 pixels. So resizing it down to 100 x 100 pixels doesn't seem a problem to me. However, i'm seeing the image in it's original size.
A random static image on the url below is being resized without any problem;
http://localhost:55062/images/47cff4e6-8932-48dc-8baf-f328e89f3f83
What could this possibly be? I've already tried adding an extension to the url with the guid and i've also added a handler to the web.config so that .jpg urls are being ran through the .net pipeline, but unfortunately this doesn't help either. I'm quite stuck on this issue for a few hours now, so hopefully somebody can help me out on this?
The imageresizing.net debugging info is shown here: http://notepad.cc/gaxafe38
Thanks to the suggestion from TiestonT I was able to solve the problem using the SqlReader plugin.
Basically I fallowed this documentation: tinymce rails image upload
It works, but the problem is that It saves every image in the db before the actual post is created. Thus even if the post isn't finished or saved, the images still remain on the server. And that is just waisting space on the server.
Does anyone know a better way for image upload with tinymce ?
I am attempting to use Imagemagick to manipulate images that are uploaded by a user. Right now I have a simple set of Imagemagick.convert[ ] commands server side that preform a variety of tasks on the uploaded image. My problem comes from Imagemagick needing the file data to be read into meteor and not from a url. What I end up doing is writing the uploaded file to the /public folder where Imagemagick is able to manipulate the image. However because the list of Imagemagick.convert commands (saving and writing to /public), the application keeps refreshing, breaking up the processes and sending it into an infinite refreshing cycle. I don't think assets is a viable solution, but I need some folder that I can write to in meteor that will not interrupt the various Imagemagick processes through a refresh. I have tried the .folder for a hidden folder, but meteor gives me an error: "You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name." Any thoughts?
#Nate I wrote a little example app that solves this problem by using a temporary directory (as others have suggested):
https://github.com/ideaq/image-uploads
My solution gives you:
Easy image uploading in any Meteor app
Images are re-sized to Thumbnail, Mobile Optimised and Full-size Original
Images are uploaded to AWS S3 for CDN delivery (scalability and speed)
A thumbnail of the image is displayed on to the user without refreshing the page
if you found a better way of doing image uploads in meteor, please share! thanks. :-)
I have been told this is possible to do but cannot get this to work.
Basically I am trying to cache and image using forge.file.cacheURL()
Now I can get the file just fine and display it in the page by creating a new Image object but what I want to do is use this cached image to change the image in the topbar.
When ever I try to do it I get an error saying "file not found" and after reading the docs a little more it seems that trigger may have "src/" coded into the class because if I put just "image/logo.png" the logo.png will show up in the header because its part of the app package.
I guess the question is.. Is my assumption correct?
Thanks!
The native UI elements (topbar/tabbar) load images directly from your apps package, not through a URL in the same ways images are shown in the webview.
What this means is that currently you can only use images included in your app in the topbar/tabbar modules.
in case anyone is interested in this, the ability was added a while ago to the API so you can now use a cached image or filesaveURL feature of forge to change the header image dynamically.