[closed] Image upload failure

Hi all,
n I’m a CF developer new to FarCry. I have installed a project and most things are working, but I am having trouble with 2 things. Any attempt to upload an image from anywhere fails, and I can not get an error message to display.

I am not sure which files to be viewing, and any attempt at editing any of them for either a fix or error display isn’t helping.

This is not a standalone install (don’t remember what the other non-advanced option is called) using FarCry 6.2.7

Any ideas/pointers?

thank you

I’ve seen this happen before where the ColdFusion doesn’t have proper write access for folders. If using Windows, I usually give up and just give the CF service a unique user with full admin rights.

Without knowing the exact error, though, it is purely speculation. Do you have access to the CF logs? You should be able to find your error in there.

Jeff,

First, thanks for taking the time to post.

There are no errors logged in the CF logs…and I tried to upload different images with different extensions. The folders are not read-only, and I can upload files successfully.

I’m unclear exactly how to make the CF service a unique user w full admin rights, bu I am wondering if that’ll make a difference considering I can upload files.

Any thoughts? thanks again

Some extra debugging that will help track down the problem:

  • how far through image creation do you get? ie. can you edit the database record no problem and its just the image upload
  • does the image attempt to upload and fail or can’t get a select image dialogue at all
  • does the image file get uploaded to the server? ie. is it visible on the file system
  • are there any errors in the web browser console? ie. is it a javascript error that is blocking the image upload widget

Is it possible to get access to your webtop to see the error in action, or can you put together a short screencast with www.screenr.com?

BTW if this is a new install you should be looking at FarCry 7.0 – we will have an installer ready this week. For upgrading you might try:

Thanks for the help! My issues may well be a moot point when I upgrade, so I will do that next.

howdy,
Well after a few days off, I have decided against upgrading the core for now. I need to wrap this project up. I will do the update at a later date.

So, to answer the debugging questions about the image upload function failing for me:
  • how far through image creation do you get? ie. can you edit the database record no problem and its just the image upload

exactly correct

-  does the image attempt to upload and fail or can’t get a select image dialogue at all

attempts to upload appear to be successful. However, when saving, the image manipulation (converting to thumbnail, etc.) does not appear to be attempted, unlike my image uploads on the local installation of farcry

does the image file get uploaded to the server? ie. is it visible on the file system

It is not uploaded to the expected folders, nor can I find it anywhere. I am not 100% sure that it is not somewhere…

are there any errors in the web browser console? ie. is it a javascript error that is blocking the image upload widget

Using Firebug in FF, the GET and POST operations appear successful and no error is apparent. See below
on image upload
Post:
folder    /farcry/core/webtop/conjuror/
status: ok

Are you on Railio? There was a recent bug introduced that borked CFIMAGE. You may be hitting that problem.

If so upgrade Railo to the latest.

The latest “stable” release of Railo, 4.1.2.005, is the one with the
cfimage bug. The workaround is to change the update provider onto “bleeding
edge” so that you can update to 4.1.2.006 or 4.1.2.007.

Can you tell us which version of CF you are using? If you are on Windows,
can you confirm the user it is running under by going into Services, by
default it will be something like “LocalSystem” which should be perfectly
capable of writing image files to disk.

Also, is it absolutely any image that is failing, or a particular image? In
very rare cases you may find an image that can’t be processed due to
corrupt meta data or unsupported color profiles.

Thanks again for the help!

The salient points are that I can upload files, documents, etc., but not images. The image upload appears to be working re. the browser UI, but I can not find the image on the server. Additionally, once the image data form is submitted, the thumbnail and other conversions don’t even “try” to work, unlike the way they do on the same installation on my local machine. I hope that is clear…

CF is running under Local System. Image upload is not working for any type of image (trying various images w/ different extensions). The CF server and OS versions are below:

Server Product     ColdFusion
Version     9,0,2,282541  
Edition     Standard  
Operating System     Windows Server 2008 R2  
OS Version     6.1  
Adobe Driver Version     4.1 (Build 0001)   

In recent versions of Windows, I sometimes run into folder rw permissions which affects both folder creation from CF as well as file uploads. Maybe look there. You should get errors in the CF logs to confirm.

I sometimes just get frustrated and give CF it’s own private admin account =\

Hey guys,

Again, thanks. Hopefully I will be attaching a merged screenshot image of the upload screen.

I created a new admin account on the server, modified the CF service to log on as that user and restarted the service. Then I tried the image upload again. Then I wept quietly in the corner of my kitchen.

Anyway, there are no errors logged in the CF log. I am wondering if this is gracefully failing within a try/catch block and, therefore, gracefully not telling me a damn thing!

Question: What CF pages (code) should I be viewing/modifying to get some cfdumps and general error output going? I really wonder if it’s some path issue, even though I can upload files through the doc manager. Specifically how can I see what path code is using for image placement?

About the attached image: So the rr_tracks.jpg image seems to be uploaded…somewhere. I don’t remember when the mid-size and thumbnail images are created, but I remember seeing the progress bar, or some indicator, on my local installation. I never see these indicators on this installation; I think this is where the page is failing.

When I hit save the form is submitted and no error messages appear. The image text data IS saved to the db.

By default your images will be saved to your projects webroot under ./images/. Typically there is a separate folder for each image cut; for example Source, Standard and Thumbnail.

Image transformations in this UI are handled via ajax calls to a service, so on screen dumps are tough to get. We should definitely be reporting errors to application.log. We’ll take a look in the morning to see if we can’t improve general debugging here.

PS. I would definitely upgrade to 7.0. If you haven’t made any customisations to the standard install then this should only be a few minutes work.

I appreciate it.

When the image uploads via the AJAX POST, the Response is []. Maybe that means something to someone…

I just did update the core. Nice work, you all!

Same problem on image upload. The name of the image appears with the text ‘processing…,’ but image never processes.

UPDATE: Can successfully upload and generate thumbs from content edit panel (bulk image upload). That is really a relief.

Does this mean the upgrade to 7 fixed your issue? Or that only bulk image upload works?

At this point, I’d say the upgrade fixed my issue because I can move on. So thanks for pressing the upgrade! It was quick and easy and worked.

More to your point, the image upload only works via the bulk upload. I still have the same fail issue with the non-bulk upload version, both from within the page content edit pane and the image library, which appear to use the same code.

Have you by any chance been trying to upload the same image(s) each time? I’m wondering if it is the image itself that could be the problem. Sometimes the native JAI has trouble with some images or if the image dimensions are too large CF itself has trouble. Just as a quick test, maybe find some random jpg on the web and test uploading it.

If it does end up being the JAI, upgrading to the latest JRE 7 might help (couldn’t hurt anyway and it’s always a good rule of thumb to keep your JRE up-to-date). Note: CF9 supports JRE 6 (no longer updated) and JRE 7. If you’re on 32bit CF9 you’ll need to use JDK 7, otherwise 64bit CF9 can use the JRE (CF10 can use the JRE whether 32bit or 64bit). Also, if you did anything custom with your previous JRE, don’t forget to do the same with the new one (like importing any certificates into your JRE keystore or using AES encryption higher than 128-bit in your JRE - these don’t concern most people as you have to go out of your way to customize these in the first place).

Thanks again for your help, everybody.

The user and site are up and running, thanks to the bulk image upload. The single image upload doesn’t work for me, nor does the image upload for the carousel. It appears to be the same issue. There aren’t any errors reported in the CF log.

I rigged the carousel to use a hardcoded array of images that I manually uploaded, so it works. But it would be nice to let the user customize it!

Hmmm… it would be nice to properly track down your problem, it’s definitely a strange one.

If you can upload files and they work fine then I don’t think it will be a permissions issue with uploading your image. It’s most likely something to do with image cropping but I haven’t seen any CF 9.02 specific issues.

  1. If you configure the site on your local machine do you still have the same problem, or is it only on this server?

  2. In your screenshot the image is almost 400kb, can you try a small file, and try multiple file format? e.g. 10kb JPG, PNG and GIF.

  3. This is a very random thing to check, but can you confirm that the URL path you use to access the webtop is the exact same path as the THIS.webtopURL value that is set in the farcryConstructor.cfm of your project? For “webroot” installs it is usually “/farcry/core/webtop”, and for “advanced” installs that use /farcry and /webtop mappings it is usually “/webtop”. If this didn’t match I think you’d be getting a few more errors though…

Ensuring everything works in a local environment is probably the easiest way to start debugging your problem though. Hopefully we can sort it out for you :smile:

2 Likes