Alfresco: Content model customization to add custom field during file upload - javascript

I just have started to work with Alfresco repository so I'm very much new to this technology. I'm facing a common problem to file upload(using simple HTML form submit) to add custom data to be saved.
I'm able to upload file to my alfresco repository. I'm also trying to add description, title as a field but they are not saved. When I check from Alfresco data dictionary web interface I find description field is blank.
Also, I need to save custom data like file size, image height, image width, file codec etc.
I've searched a lot this forum and internet and found several answers but none of them are complete or relevant to my work. In many cases it is stated that I need to define my custom fields in the content model XML but I'm not sure enough how to do that.
I would like to mention some references,
http://wiki.alfresco.com/wiki/Data_Dictionary_Guide
http://alfrescoblog.com/2014/05/19/alfresco-tutorial-custom-content-types
http://docs.alfresco.com/3.4/references/RESTful-UploadUploadPost.html
Another problem is most of the answers are related to JAVA which is not my technology.
I need to upload file with simple form submit by post data using the file upload API as
/alfresco/service/api/upload.
Along with custom data to be saved.
I'm bound to use technologies like HTML, Javascript, Jquery.
If someone help me by stating step-by-step process to achieve this it will be highly appreciated.
Thanks in advance.

Please read this tutorial on custom content types, which also includes a section on CMIS, which you may find relevant.

Related

iText - Need a solution for running a pdf form scripts programmatically

We are building a solution to fill in programmatically a PDF form with XFA with iText and .Net. A brief presentation of the solution: we need to update the xfa with our data but before that we need to run jave scripts to update the form fields. We've kept trying to find a solution to this issue in the iText docs, but nothing so far. Is there anyone out there who can help.
We can also pay for it, if necessary.
Really appreciate any feedback.
All the best and stay safe,
We extracted all events, scripts from XFA PDF on Acrobat reader. After adding the js, it has only read-only properties.

Need ScriptReferenceProfiler.dll or alternate

I improving site performance and for that, I try to Bundle or combine ScriptResource.axd and Webresource.axd but before combine to I need to know javascript file reference name which is used by ajax control toolkit in asp.net web form
like this https://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/
I need ScriptReferenceProfiler.DLL to get a reference of the javascript file which is used in ajax toolkit on the web page.
do you have any idea to get this dll file
I go through this tutorial
https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/using-script-combining-to-improve-ajax-performance
Or if you have any alternate solution please let me know
The file you looking and reference from the link you add was here : http://aspnet.codeplex.com/releases/view/13356
I can not find it now so I uploaded for you here, both source code and binaries.
http://planethost.gr/so/ScriptReferenceProfiler.zip
http://planethost.gr/so/ScriptReferenceProfilerBinaries.zip

How to use a basic Google Sheets javascript script in GitHub Pages?

Trying to implement a piece of code to display data from a Google Spreadsheet in my GitHub Pages page. I found Sheetrock.js and the JS Fiddle worked, but I'm missing how to setup a basic javascript file structure. I know I can name files ___.js and call them from the html file, but the Sheetrock.js info doesn't use this format. I remember trying this a while ago and after hitting the same roadblocks gave up, so I'm posting to hopefully save others, coming from a similar search for using GSheets in a static site through javascript, hours of searching on such a simple problem.
I searched for hours (through Jekyll tutorials and other JS package installations). I know this seems simple now, but there was only one basic javascript setup I finally found that answered it after searching on 'javascript', 'github pages', and even jquery with GH.
So the basic answer seems to be to simply create an index.js file next to index.html, and this is of course where all the generic javascript goes. The tags and external http CDN js file imports go in the HTML file.
You can use other javascript means such as JSON based access to connect to GSheet data, but Sheetrock.js seems to be doing okay.
There are also ways to adjust the iframe to select columns and use the SQL language base using the Google Google Visualization API Query Language described in this page. The SQL type commands carry over to the Sheetrock.js usage.

Attach PDF to PDF as attachment (not as a page) via Javascript in HTML (not in Acrobat)

I would like to generate a PDF portfolio using JS from an HTML/CSS page on a local machine. I would use a PDF template file which includes a PDF portfolio Navigator in SWF form. I have successfully accomplished this using C# and a command line program, but can not identify the proper Javascipt components to do this browser-side or pseuo-server with Node.js. Basically, I am looking for something which will allow me to append a PDF to a new or existing PDF via configuration choices and an 'assemble' action using a JS or HTML button. iTextSharp provides the required PDF interaction functionality, but I can not figure out to run this inside an HTML to allow configuration via the HTML/CSS DOM (i.e. checkboxes, text field desciptors, etc...). Does a library with this type of functionality exist?
So you want to create a PDF using JavaScript?
On a quick google search, I found what appears to be a javascript library for creating and manipulating PDFs call jsPDF
If you want information on how to upload files with JavaScript alone, here is an article on how to do that. It also shows you how to use the file element.
For style, I recommend using a CSS Framework is you don't know much about CSS. I personally use Twitter Bootstrap for quickly prototyping things. It's quick and easy, and has good documentation. You can also use this to see how to make a form in HTML. I haven't got any good starter tutorials for HTML off the top of my list, sorry.
If you don't know much about JavaScript, when it comes to getting the options from the form, so that you can use them as configuration options, I'd suggest using the jQuery framework. It'll help you get up and running quickly enough
Note, all of this shouldn't replace basic training in JavaScript and HTML/CSS. Frameworks make things simpler, but if you don't know how to do something without a framework, you're going to have a hard time with a lot of the more complicated things. This goes for every language

How to make own file upload using HTML and javascript

I need to make new own file upload field using HTML and Javascript since Built-In file upload not showing full path of the file
I need to make it similar to file upload by using button and textbox
please help to solve this problem
You can't.
There are security considerations browsers must adhere to and there is now way around that.
FYI this is also why Firefox doesn't allow drag and drop into a file field.
Just fyi, I think the path display depends on your browser.
If you're willing to/can do so, java (not javascript) might be able to help you with your original problem. Java brings it's own problems, though.
The file upload is a specific input type, which you can't easily replace, but in some browsers you may be able to style it.
You should be able to access the filename from javascript, and display this in a different part of the page (possibly hiding the file input at the same time) so the user can see what will be selected.
Another option is to use Flash for a fancier front-end (see http://www.flickr.com/photos/upload/ (assuming you have a flickr account) as an example), but I've never used one of these as a developer

Categories

Resources