Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Squazz 35 posts 111 karma points
    Mar 18, 2015 @ 10:58
    Squazz
    0

    Upload property editor - remove file

    Hi there

    I am using the default upload property editor to upload a CSV file, iterate through it, and add data from it Umbraco. But after this operation, I would like to delete the file again.

    I have tried to listen on the ContentService Saved event, which registers that my CSV filed have been saved to the site. But when I try to look up my CSV file with GetMediaByPath it returns null.

    As it is said in the following link, the files isn't saved in the media library: https://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors/Upload

    But, if my file isn't saved in the media library, then how do I find it, and delete it?
    The Upload property editor has a "Remove file(s)" checkbox. Is there any way to do this via C# in stead of having to do this manually?

     

    I'm kinda new to Umbraco, so please do tell me if there is any kind of information that I can provide to help you help me.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies