I'm using this package and need to be able to get the Media ID after a file is uploaded. I haven't found any way to do this. I read some other posts which mentioned a FileSaved event, but when I tried that, I couldn't call that event (I could, however, call the FileUploaded event). Is there a version of the DLL which has the FileSaved event or another way to get the Media ID?
The package has been updated to contain the FileSaved event as expected. Aditionally, the handler will return the Media ID instead of just "1" when called.
Thanks for the reply. I tried the updated package, but unforutately had to downgrade to the previous package as the update gave me errors (I'm using Umbraco 6.0.3, and ran into issues with umbraco.Global). The error that I'm getting is:
"Could not load type 'umbraco.Global' from assembly 'umbraco, Version=1.0.4898.16911, Culture=neutral, PublicKeyToken=null'."
Based on what I could tell from some research, global.asax inherits from Umbraco.Web.UmbracoApplication instead of umbraco.Global in Umbraco 6.0.3. This would explain why I couldn't implement the event handlers in the way you had explained in this post.
Would it be possible for you to upload or send me a version that doesn't rely on umbraco.Global so I could use it in my Umbraco installation? If so, I would be more than happy to post my findings on how to use FileSaved events in an Umbraco 6.0.3 environment.
Get Media ID of Uploaded Files
I'm using this package and need to be able to get the Media ID after a file is uploaded. I haven't found any way to do this. I read some other posts which mentioned a FileSaved event, but when I tried that, I couldn't call that event (I could, however, call the FileUploaded event). Is there a version of the DLL which has the FileSaved event or another way to get the Media ID?
Hi Christopher,
The package has been updated to contain the FileSaved event as expected.
Aditionally, the handler will return the Media ID instead of just "1" when called.
It should have been there in the first instance.
Cheers,
Emanuel
Emanuel,
Thanks for the reply. I tried the updated package, but unforutately had to downgrade to the previous package as the update gave me errors (I'm using Umbraco 6.0.3, and ran into issues with umbraco.Global). The error that I'm getting is:
"Could not load type 'umbraco.Global' from assembly 'umbraco, Version=1.0.4898.16911, Culture=neutral, PublicKeyToken=null'."
Based on what I could tell from some research, global.asax inherits from Umbraco.Web.UmbracoApplication instead of umbraco.Global in Umbraco 6.0.3. This would explain why I couldn't implement the event handlers in the way you had explained in this post.
Would it be possible for you to upload or send me a version that doesn't rely on umbraco.Global so I could use it in my Umbraco installation? If so, I would be more than happy to post my findings on how to use FileSaved events in an Umbraco 6.0.3 environment.
-Christopher
I get the same:
Is there a working version for Umbraco6+?
is working on a reply...