Skip to content

Image upload fails sometimes #26

@Timo-Breumelhof

Description

@Timo-Breumelhof

In some cases the image upload returns an error.
If this happens there's an error in the DNN Event log like this:

InnerException:Could not find a part of the path 'E:\WwwRoot\Portals\0\actueel\vandaag\Employees\homefolders\FirstLast\Pictures\test.jpg'.

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:System.IO.__Error.WinIOError

StackTrace:

Message:

DotNetNuke.Services.Exceptions.PageLoadException: Could not find a part of the path 'E:\01_Production\WwwRoot\Portals\0\actueel\vandaag\medewerkers-dc1\homefolders\FirstLast\Pictures\test.jpg'. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\01_Production\WwwRoot\Portals\0\actueel\vandaag\medewerkers-dc1\homefolders\FirstLast\Pictures\test.jpg'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at System.Web.HttpPostedFile.SaveAs(String filename)
at Ventrian.NewsArticles.Controls.UploadImages.btUpload_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---

Source:

It seem that Windows attaches a path to the image file name for some reason and thus the image cannot be found after upload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions