Failing to upload Product Image

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
Hello everyone,
I'm having difficulty uploading an image for my product.

From the "Product Variant Info" screen I can browse and select an image file, however when I save I get the generic message...

We're sorry, an internal error occurred that prevents the request to complete.

Our supporting staff has been notified with this error and will address this issue shortly. We profusely apologize for the inconvenience and for any damage this may cause. You might want to try the same action at later time.


The only way to fix this is to manually enter the db and change the "PictureID" in the "ProductVariant" table back to 0.

The logs show the same error message as others have posted (see below). But where it seems the suggestion to enable the write permissions on the images folder has worked for others, I'm not having the same luck.

So, I have 2 questions.
1) Why do you have to enable write permissions on the images folder when the images are saved in the database (my uploaded image never gets added to the db and it appears to not even try to upload the image)

2) Assuming I'm doing it wrong, exactly how do I enable write permission on the images folder? (I'm using IIS7, service pack 2)

Thanks


System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String filename, ImageFormat format) at NopSolutions.NopCommerce.Common.Media.PictureManager.GetPictureUrl(Picture picture, Int32 TargetSize, Boolean showDefaultPicture) in E:\WorkingFiles\PrestonM\TFS_Source\MS.Net2.0\Apps\American Idol Phase 2\Libraries\Nop.Common\Media\PictureManager.cs:line 283 at NopSolutions.NopCommerce.Common.Media.PictureManager.GetPictureUrl(Picture picture, Int32 TargetSize) in E:\WorkingFiles\PrestonM\TFS_Source\MS.Net2.0\Apps\American Idol Phase 2\Libraries\Nop.Common\Media\PictureManager.cs:line 120 at NopSolutions.NopCommerce.Web.Administration.Modules.ProductVariantInfoControl.BindData() at NopSolutions.NopCommerce.Web.Administration.Modules.ProductVariantInfoControl.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.administration_productvariantdetails_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\shop\6c236f96\c4125978\App_Web_qzeibxq5.48.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
14 years ago
I never had to set any specific permissions on the images folder.

The rare time I had this problem uploading an image, I increased my DB size and it went away.

Are you local or hosted?
14 years ago
We have our own web servers inhouse.

We also have a dedicated SQL box.
14 years ago
Some more info. Perhaps this will help someone think o f something.

Our SQL servers are unrestricted. This db has no different permissions or restrictions than our other production dbs (unlimited growth).

Something I said in my first post was wrong. Binary data IS getting saved into the Picture table.
Each time I upload an image, the PictureID for in the ProductVariant table is updated correctly to the new PictureID.

At that point, viewing the product page causes the failure.

Upon closer examination, it appears from the log file that there's reference to a path from my working folder on my dev machine??

The error was generated by accessing a page on the webserver. There should be no connnection or reference to the dev machines.
14 years ago
You have to give write permissions to \images\thumb directory
14 years ago
Thanks.
That was it.

I was so close yet I was missing it.
I was applying write permissions to the folders, but it wasn't cascading to child folders and files.
3 years ago
hello
i have error on upload picture on product page(admin)
nopcommerce version is 3.9
short description : Value does not fall within the expected range.
------------------------------------------------------------------------------------
System.ArgumentException: Value does not fall within the expected range. at Nop.Admin.Controllers.ProductController.ProductPictureAdd(Int32 pictureId, Int32 displayOrder, String overrideAltAttribute, String overrideTitleAttribute, Int32 productId) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2 years ago
please help me!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.