Can I ask some help regarding Gecko Uploadify(1.5)!!.
I want to upload a description field with each files in it. I have managed to add a description fieldb by modifiying the jquery.uploadify.v2.1.0.js. and the Uploadify.ascx. Now I need to store it, as an another property like image height width properties. So I would like have the source code(code behind), or an updated dll including description field. I Am using umbraco version 4.7.0.
Are we saying about the class UploadifyHandler But I failed to find a useful event to insert a user entered text as description in the decompiled dll.
As I am a newbie in ASP can you please be some more elaborate. which event I have to use, and how etc. I want to create a gallery with user entered description/caption for each image. Now I have created everything (the gallery), but need to add the description field and pick that to the gallery
I believe the 1.5 version only has the "FileUploaded" event, which triggers before the Media item is saved in Umbraco. Version 1.6 does have the "FileSaved" event, which you can use like so:
Gecko.Uploadify.UploadifyHandler.FileSaved += new Gecko.Uploadify.FileSavedEventHandler(UploadifyHandler_FileSaved);
void UploadifyHandler_FileSaved(object sender, Gecko.Uploadify.FileSavedEventArgs e) { var mediaItem = e.Media; // set the description for the mediaItem object using the standard Umbraco methods }
{ public class Global : umbraco.Global { protected override void Application_Start(object sender, EventArgs e) { base.Application_Start(sender, e); UploadifyHandler.FileUploaded += new FileUploadedEventHandler(UploadifyHandler_FileUploaded); UploadifyHandler.FileSaved += new FileSavedEventHandler(UploadifyHandler_FileSaved); }
void UploadifyHandler_FileSaved(object sender, Gecko.Uploadify.FileSavedEventArgs e) { var mediaItem = e.Media; // set the description for the mediaItem object using the standard Umbraco methods
Description field in Gecko Uploadify
Hi,
Can I ask some help regarding Gecko Uploadify(1.5)!!.
I want to upload a description field with each files in it. I have managed to add a description fieldb by modifiying the jquery.uploadify.v2.1.0.js. and the Uploadify.ascx. Now I need to store it, as an another property like image height width properties. So I would like have the source code(code behind), or an updated dll including description field. I Am using umbraco version 4.7.0.
May I have your help in this.
Hi,
Import the dll into you VisualStudio project, there should be an event in the main Gecko.Uploadify Handler class.
Thank you Emanuel for the response.
Are we saying about the class UploadifyHandler But I failed to find a useful event to insert a user entered text as description in the decompiled dll.
As I am a newbie in ASP can you please be some more elaborate. which event I have to use, and how etc. I want to create a gallery with user entered description/caption for each image. Now I have created everything (the gallery), but need to add the description field and pick that to the gallery
Please help me.
Hi,
I believe the 1.5 version only has the "FileUploaded" event, which triggers before the Media item is saved in Umbraco.
Version 1.6 does have the "FileSaved" event, which you can use like so:
Gecko.Uploadify.UploadifyHandler.FileSaved += new Gecko.Uploadify.FileSavedEventHandler(UploadifyHandler_FileSaved);
void UploadifyHandler_FileSaved(object sender, Gecko.Uploadify.FileSavedEventArgs e)
{
var mediaItem = e.Media;
// set the description for the mediaItem object using the standard Umbraco methods
}
Thank you Emanuel,
Just need to confirm, whether i get it correct.
if the following is my description,
stringdescription=context.Request["description"];
then I have to create a Global.asax
using Gecko.Uploadify;
namespace Your.Namespace
{
public class Global : umbraco.Global
{
protected override void Application_Start(object sender, EventArgs e)
{
base.Application_Start(sender, e);
UploadifyHandler.FileUploaded += new FileUploadedEventHandler(UploadifyHandler_FileUploaded);
UploadifyHandler.FileSaved += new FileSavedEventHandler(UploadifyHandler_FileSaved);
}
void UploadifyHandler_FileSaved(object sender, Gecko.Uploadify.FileSavedEventArgs e)
{
var mediaItem = e.Media;
// set the description for the mediaItem object using the standard Umbraco methods
mediaItem.getProperty("description").Value=description;
}
*************
Am I right or can you pls correct me?. Thank you.
var description = HttpContext.Current.Request["description"];
mediaItem.getProperty("description").Value = description;
Seems about right to me.
Okay, Global.asax is the right way to do this?
Just Wanna make sure am in the right way. It too late for me to finish this. Thank you
Yes, that's correct.
I have given you all the information you need, everything else is just normal Umbraco and/or ASP.NET development.
Thank you Emanuel. Let me try this.
is working on a reply...