cannot upload the Image files - giving and error

  1. Avatar of Aminda

    Hi Please help me with this matter

    I have setup the better cms locally and everything working fine except image uploads. looked in to the error log its giving the below.

    One or more errors occurred. System.AggregateException: One or more errors occurred. ---> System.NotSupportedException: The given path's format is not supported. at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at System.IO.Directory.CreateDirectory(String path) at BetterCms.Core.Services.Storage.FileSystemStorageService.UploadObject(UploadRequest request) at BetterCms.Module.MediaManager.Services.DefaultMediaFileService.<>cDisplayClass16`1.<UploadMediaFileToStorage>b11() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()

    if anyone can help on this would be much appropriated.

    Cheers Aminda

  2. Avatar of Audrunas

    Hello, Aminda,

    what's the path of the folder, where your files should be stored? Check, if folder exists, and if the IIS or IIS express have permissions to write to the specified folder.

  3. Avatar of Aminda

    Hi there thanks for getting back. I checked the upload folder permissions, and even I have added everyone full control of that folder.

    storage location is default as

    <storage serviceType="FileSystem" contentRoot="~/uploads" contentRootUrl="~/uploads" processTimeout="00:15:00" />

    but it still giving the same error. and its working fine when i use the file upload tab and try to upload the same image file. this is happening only for media manage-> upload images

    if you can help please.

    Thanks Aminda

  4. Avatar of Audrunas

    Hello,

    ok, but I see the keywords "CreateDirectory" and "FileIOPermission". It may be, because when uploading an image, thumbnail version is created. Check upload folder's security permissions - if all assigned identities has full access. No more ideas how to help.

    I'll try to deny the access to uploads directory and write back if I find a solution.

  5. Avatar of Ian

    Hello. I know this is a rather ancient topic, nevertheless I felt it might be useful to provide some useful insight. I was experiencing the same problem when I published the app to the production server (note: it was working fine on my local test environment) and attempted to resolve the issue by first looking through the web to see if anyone else had hit the same road block and then making changes to storage configuration scripts; but alas, I found no relevant information on the web and the only result I achieved by modifying the storage configuration scripts was one server error after the other (haha). It occurred to me at that point that, since the function executed properly on my local test environment, the issue was likely caused at a web server level. So I went fishing through GoDaddy's cPanel and after several attempts I succeeded.

    The solution (if the variables of your problem are similar to mine): find the Virtual Directories settings on your web server control panel and modify the media directories permissions. Once you are there, locate the Application Pool user permissions and give them Read and Write access.

    As I said, I know this particular topic is old, but I'm leaving this here in hopes that it will save someone else the monumental headache that I experienced trying to resolve this problem.

  6. Avatar of Felipe Grossi

    Thank you for post this solution in ancient topic. I was searching exactly this!

* Mandatory
* Mandatory
* Mandatory

Verify that you are human