cancel
Showing results for 
Search instead for 
Did you mean: 

how to find file upload codes in source code

feiwang_
Champ in-the-making
Champ in-the-making

I'm now do dm file upload and I want to find nuxeo source code how to do that.thanks

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

This is a bad idea to fork Nuxeo code and Nuxeo provide a framework dedicated for developer to help them to plug their own code on the platform. This is provided by our extension point system. I let you discover this by reading this documentation: http://doc.nuxeo.com/x/DIAO

For your case, you want - if I'm right - to create your own logic of document creation from a post.

This is typically what the File Manager Service you need. My piece of advice is to use Nuxeo IDE to create an empty bundle: http://doc.nuxeo.com/x/aoKE

And contribute your File Manager by adding this xml file that will declare your class:

  <?xml version="1.0"?>
  <component name="com.feiwang.filemanager.contribution">

    <require>org.nuxeo.ecm.platform.filemanager.service.FileManagerService</require>

    <extension
      target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService"
      point="plugins">

      <plugin name="yourFileManager"
          class="com.feiwang.filemanager.contribution.YourClass"
          order="0">
        <filter>.*</filter>
      </plugin>
    </extension>
  </component>

Your class must implement the FileImporter interface and you can inherit of AbstractFileImporter.

Think to add into your pom.xml this dependency:

<groupId>org.nuxeo.ecm.platform</groupId>
<artifactId>nuxeo-platform-filemanager-core</artifactId>

View answer in original post

5 REPLIES 5

feiwang_
Champ in-the-making
Champ in-the-making

I'm using nuxeo dm as a server ,the client using flex to develop .I want to know what or where I can find the code that to do file upload.what class or package I can find it .thanks

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Hi you may be more interested with our Flex connector add-on that expose API needed for Flex application.

http://hg.nuxeo.org/addons/nuxeo-platform-flex/

To get source, as usual (until we move the code to github 🙂 :

hg clone http://hg.nuxeo.org/addons/nuxeo-platform-flex/

But, you also may find your need here.

Thanks bjalon's answer,but I want to konw nuxeo code how to deal with the file upload .and I want to change that . The problem is I don't konw how begin and find the class .I have to write a class replace the old class or do by myself class . thanks .

feiwang_
Champ in-the-making
Champ in-the-making

Thanks bjalon's answer,but I want to konw nuxeo code how to deal with the file upload .and I want to change that . The problem is I don't konw how begin and find the class .I have to write a class replace the old class or do by myself class . thanks .

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

This is a bad idea to fork Nuxeo code and Nuxeo provide a framework dedicated for developer to help them to plug their own code on the platform. This is provided by our extension point system. I let you discover this by reading this documentation: http://doc.nuxeo.com/x/DIAO

For your case, you want - if I'm right - to create your own logic of document creation from a post.

This is typically what the File Manager Service you need. My piece of advice is to use Nuxeo IDE to create an empty bundle: http://doc.nuxeo.com/x/aoKE

And contribute your File Manager by adding this xml file that will declare your class:

  <?xml version="1.0"?>
  <component name="com.feiwang.filemanager.contribution">

    <require>org.nuxeo.ecm.platform.filemanager.service.FileManagerService</require>

    <extension
      target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService"
      point="plugins">

      <plugin name="yourFileManager"
          class="com.feiwang.filemanager.contribution.YourClass"
          order="0">
        <filter>.*</filter>
      </plugin>
    </extension>
  </component>

Your class must implement the FileImporter interface and you can inherit of AbstractFileImporter.

Think to add into your pom.xml this dependency:

<groupId>org.nuxeo.ecm.platform</groupId>
<artifactId>nuxeo-platform-filemanager-core</artifactId>
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

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.