cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Metadata upon upload

yuhuayang
Champ in-the-making
Champ in-the-making
Hi All

I am looking for any tutorial or any guide to implement a simple feature:

when a user uploads a document, he is prompted to enter the custom metadata associated with the document type

It is best illustrated by this add-on built commercially: http://alfresco.fme.de/extension-gallery/overview/edit-meta-data-during-upload/

In lieu of a fancy pop-up, I am willing to settle for redirecting the user upon upload to the Edit Properties page and edit the metadata from there, I thought that I could simply add a custom rule which upon meeting conditions it executes a javascript, uploaded to Repository->DataDictionary->Scripts. However it seems that the javascripts uploaded into here are server side and so does nothing in terms of redirection.

How can I solve this problem? I found a few threads on here and stackoverflow of people trying to implement this, but nobody has yet posted a solution, did they all just give up or did fme.de remove all those posts since if there was a posted solution, nobody would buy their addon?

Thanks for your help
17 REPLIES 17

tytanix
Champ in-the-making
Champ in-the-making
This post is very interesting! This solution could solve a part of my problem. Now i'm able to edit metadata after uploading a file but i also want to assign a type to documents when i upload them. Searching in the web i've found that i can simply modify flash-upload.get.js and dnd-upload.get.js adding my type in the list of getContentTypes function. Well, while in the web seems like that operation will work perfectly, it still doesn't work to me. Does anybody know anything about how to display the dropdown list to chose type for a document in the upload form? And also, how to avoid the auto-disappearing of the upload-form after the upload is completed?
Thank you very much!

andresfr
Champ in-the-making
Champ in-the-making
That's a really good approach, I'll definetely test it as soon as I could. My exact expected behaviour is none of the mentioned, but it could be a first solution to improve.

My perfect behaviour should be:

-Multiple upload, and a page under it with:

-Metadata form, precalculating aspects taking folder rules if it's possible.
-Ask for metadata and don't allow to upload until all mandatory metadata are set. Mandatory is mandatory, I don't understand non catalogued documents in repository.

-For setting the metadata in all documents, the optimal solution could be a "pagination" where you could go forward and back filling the metadata for each document or click on a checkbox "apply metadata to all documents" taking title from document name and setting the same values.

I'll try the first solution and see if it inspires me Smiley Happy


tytanix
Champ in-the-making
Champ in-the-making
If you haven't solved the html problem yet, i've found a solution.
I was having the same problem using alfresco community edition 4.2c. I've tried to call Alfresco.util.navigateTo with POST method and it has worked!

In /share/components/upload/html-upload.js, before the callback at the and of the function onUploadSucces, I've added this two lines

<blockcode>
             var nodeRefURL = "edit-metadata?nodeRef=" + response.nodeRef;

              Alfresco.util.navigateTo(nodeRefURL, "POST");
</blockcode>

vicmutish
Champ in-the-making
Champ in-the-making
I have managed to redirect a user to edit property form after document upload. Now my problem is that, I have managed to allow the user to select custom type of the document during upload using the following function
function getContentTypes()
{
   // TODO: Data webscript call to return list of available types
   var contentTypes = [
   {
      id: "custom:GExternalCommittee",
      value: "External Committee"
      
   }
return contentTypes;
}

model.contentTypes = getContentTypes();

This is only working in IE 8.0. I have refreshed my firefox browser and clear cache with no success.
Second thing, after upload of document, the user is not been redirected to edit property window in IE 8.
Is there anyone who have solutions to this? Am using Alfresco community 4.2f

camachompi
Champ in-the-making
Champ in-the-making
He conseguido que al subir un documento me pida las propiedades de dicho documento. hasta hay bien, ahora viene el problema que me trae de cabeza y es que al subir mas de un documento cuando me pide las propiedades solo se las asigna al primer documento y a los demás los dejas con las propiedades vacías. quería saber si ustedes han podido configurar alfresco para que asigne las propiedades del primer documento a los demás documentos cuando se trata de una subida múltiple o algo similar.

softwareloop
Champ in-the-making
Champ in-the-making
Hi. I know this thread is a bit old but the subject of uploading documents with type and metadata is still interesting to many Alfresco users and developers.
I recently mentioned this thread in a proposal for a new plugin:
https://forums.alfresco.com/forum/developer-discussions/add-ons/plugin-upload-metadata-10242014-1140

And today I've published the first release. The plugin is called uploader-plus.
Announcement: http://softwareloop.com/uploader-plus-an-alfresco-uploader-that-prompts-for-metadata/
Project on github: https://github.com/softwareloop/uploader-plus

Your feedback is welcome.

Paolo

sagarika
Champ in-the-making
Champ in-the-making
Hi sir,

Really this is very useful plugin.But I'm unable add custom fields like Customer name, Expiry Date,Action Required,Email ID, department to the popup form. Please give solution for this where to add these fields. I'm new to alfresco so give some detailed info.

Thanks in advance

douglascrp
World-Class Innovator
World-Class Innovator
In order to add custom fiels, you have to create a custom content type.
You will find more information about the topic here http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html

When you are done with your custom type, you will have to configure share as described here http://softwareloop.com/uploader-plus-working-with-custom-content-types/
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.