Snippet to Upload a document

I am looking for a portlet/snippet that allows me to programatically upload a document into the knowledge directory. I do not want to create just a link, rather I need to upload the content to the DR and also create a card.
Phil Orion | [email protected] | www.orionsmith.com

Can you leverage it in your portlets? We intend to use it as a part of the base 5.x product, but I was hesitant to tinker with it not knowing if this was a supported way of providing file upload capabilities through custom portlets.

Similar Messages

  • Getting error while uploading a document in a library

    Hi,
    I'm getting a weird error while uploading the document in the library. And I don't get it all the times but most of the times.
    It reads:
    The file <library name>/<file name> has been modified by i:0#.<user-id> on <datetime stamp>
    How to resolve this ? I have referred many articles on this one, but none helped.
    Thanks for your response in advance.
    Regards

    Hi Prajk,
    Based on your description, I recommend to check if there are any ItemAdded event receiver or workflows which are triggered when an item is created to update the document properties in the library.
    If there is any ItemAdded event receiver on the library, I recommend to wait for ItemAdded to finish before the ListFieldIterator control residing on EditForm.aspx loads (It’s the ListFieldIterator which displays the Item’s fields ).
    http://blogs.msdn.com/b/manuj/archive/2009/09/22/itemadded-event-on-document-library-the-file-has-been-modified-by-on-error.aspx
    If there is any workflow on the library, I recommend to add a Pause for Duration step at the beginning of the workflows.
    If above cannot work, please check ULS log for detailed error message.
    For SharePoint 2013, by default, ULS log is at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Uploading Multiple Documents To a List Item sharepoint 2010

    hi Guys ,
    Is there a way we can enable (out of the box )Uploading Multiple Documents To a List Item sharepoint 2010 ?
    cheers

    No, There is no OOB way to do the same you have to build a custom Page/Control OR customise OOB Form to attache multiple files and that will be through integration of ajax based control (multiple file uploader.)
    the other way to do the same is provision a custom field. we have done this for our many  clients.
    Hi, I also encountered the same problem, could u pls provide detailed information by a custom field?

  • Empty PopUp Dialog box while uploading a document in document library

    Hi ,
      I  want to upload a document to shared document folder .While adding new document to this library it opens browse dialog and then  after i selected some specific document  then select "ok" then after it appears an empty dialog
    which does not contains any thing except close and maximize button at the top corner.
    It appears in all sites/site collection through out the  web application
     Can any one help me ....
    thanks in advance ...
    Nag 

    hi
    Try uploading a single file of small size.
    Please let me know the outcome
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • I get two screens while uploading a document in a library

    Hi,
    I get two upload screens while uploading a document to a library. Take a look at the below screenshots. Can somebody please tell me how can I club these two to one.
    I need only one upload screen with all the metadata listed.
    Many thanks for your response.
    p.s. also please tell me an out of the box way to do this. Even scripting is okay.
    1.
    2.

    In the first screenshot I can see the link "Upload files using Windows Explorer instead". You can use that option to upload your files and the default values for metadata would be taken for those files. 
    From the second screenshot I can see there are custom columns in metadata because of which the second dialog is shown. If there are no custom columns in metadata then the second dialog will not appear.

  • When trying to upload a document or attach a document in an email Firefox gives me an error "Failed to load CTDFMRES.dll" and stops responding, I have no issues in any other browsers. And I am using Firefox 4, Fixes???

    When trying to upload a document or attach a document in an email Firefox gives me an error "Failed to load CTDFMRES.dll" and stops responding, I have no issues in any other browsers. And I am using Firefox 4, Fixes???

    You don't have to disable any addons or extentions!!!You guys are not going to believe this I figured out the problem it's really dumb...ok here goes the attachment uploader loads seperate so I got to thinking it's a popup so I went to options content and under block pop ups there is an option exceptions click on that and in the box type firefox.com and hit allow pow its fixed!!!!! :-)

  • Getting Error While Uploading Clause Document in SAP Sourcing 9.0

    Hi,
    --------------------system description--------------
    SAP Sourcing 9.0
    SAP NW7.31 AS JAVA
    IBM DB2 9.7
    I am getting error while executing clause document.
    ----------------------Error Description---------------
    Login with buyer link into the system-> it has all authorizations
    then Goto -> Contract Management -> Clause Library -> Clause list -> Click on New button -> Click on Add button -> Browse Document
    it is showing POPUP with Error that "There is a problem with the Contract Generation web service Contact your system administrator"
    Thanks and Regards,
    Murtaza Najmi

    Hi Gary,
    it is standalone system i have, everything i have installed on one server.
    i have already checked with restarting IIS server, and i can see word service while running url in contractgen.serviceurl, word service is running fine on browser but when i upload the document a popup window comes with error as i have shown above in my query
    Thanks once again Gary for replying
    Thanks and Regards,
    Murtaza Najmi

  • Uploading multiple documents into sharepoint list item with REST in sharepoint 2013 using content editor web part :

    hi ,
    i am trying to upload multiple document files into sharepoint list item. I followed below link for implementaion.
    http://techfindings-prem.blogspot.in/search/label/jquery.multifilejs
    It was working for sharepoint hosted app.
     This complete code is written within content edito web part.
    It was working when i was in root site collection with below change (hard coded the root level url) in code in "UploadFile" function.
    var scriptbase = "http://servername" + "/_layouts/15/";
                console.log(' File size:' + bytes.length);
                $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    But the issue came in picture when i was working with the other site collection instead of root one. The url was like below.
    "http://servername/sites/cpg/". This time i need to be there within "cpg" site collection. 
    Now if i hard code the url as i did above my code gets break here while come to below line
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
    I am getting error when i used below code:
    var scriptbase = "http://servername" + "/_layouts/15/";
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    Please hekp in this case. This complete code is written within content edito web part. 
    Regards:
    Sanjay Joshi

    Hi,
    According to your post, my understanding is that you have an issue about upload multiple documents files into library vai REST API.
    As you have said, you have used the hard code url in your code.
    How about use the _spPageContextInfo.webAbsoluteUrl method to get the url?
    I have used this method to get the url, then use the code in the article you have pasted within a content editor web part to upload the files.
    You can replace the hard code url with the _spPageContextInfo.webAbsoluteUrl method, then check whether it works.
    Thanks,
    Jason
    Jason Guo
    TechNet Community Support

  • "Function code cannot be selected" error while uploading a document.

    Hi,
    When we try to upload a document into SAP the user is getting the error "Function code cannot be selected". Detailed error is given below. Only one user is facing this error in PRD. For all other users it is working fine. We replicated the same issue in testing systems and it is working fine there with the same user's id.
    The detailed error is,
    No batch input data for screen SAPLF040 0300
    Message no. 00344
    Diagnosis
    The transaction sent a screen that was not expected in the batch input session and which therefore could not be supplied with data.
    Possible reasons:
    1. The batch input session was created incorrectly. The sequence of screens was recordly incorrectly.
    2. The transaction behaves differently in background processing in a batch work process than when running in dialog (SY-BATCH is queried and changes the screen sequence).
    3. The transaction has undergone user-specific Customizing and therefore certain screens may be skipped or processed differently, according to the current user. If the person who created a batch input session is not the same as the person now processing it, this problem may occur frequently.
    System Response
    None.
    Procedure
    For 1: Either re-create the session or process it in expert mode. Correct the batch input program.
    For 2. It is very difficult to analyze this problem, particularly in the case that the screen sequence or the display-only options of fields differ according to whether the transaction is being processed in the background or as an online dialog. It could also be that this kind of transaction cannot run with batch input.
    For 3: Have the creator of the session process it. If no error occurs now, then this is a program with user-specific Customizing.

    Hi Amar,
    I am facing the same issue while processing Vendor master inbound idocs, Few Idocs gone in error with error message "Function code cannot be selected".
    Could you please suggest any solution found for the same.
    Thanks in advance
    Shivam

  • Getting Runtime error while uploading Business document (in .DOC format) to project in Solution Manger under Gen. Documentation tab (SOLAR01) .

    Hi there,
    Below are the steps that I followed to upload the business doc.
    S1: Uploading the business process related document file (.DOC) to the business process step under Gen. Documentation tab.
    S2: Providing the title, docuemtnatation type and released status for uploading the new document.
    S3:  Selecting the .DOC file to be uploaded. As soon as I try to upload the document I am getting the run time error as shown in the attachment. It is showing the short description that function Module "IW_C_PH_CLASS_VSP_GET" not found. I followed the steps to resolve this issue mentioned in the description. But still I am getting the same dump again and again. Any help will be highly apperitiated.
    Thanks and Regards,
    Rutvik Upadhyay

    Hi Rutvik,
    Please check and implement notes:
    1823986 - SYB: Improved Data Load ("ins_by_bulk")
    1605169 - SYB: SAP BW7.02 Correction Collection
    Thanks
    Vikram

  • How do i upload a document from my MacBook Pro to iCloud?

    How do i upload a document from my MacBook Pro to iCloud?

    To get Pages Documents (and Word) to iCloud from your computer, log into iCloud.com and go to the iWork tab. Then copy that file to the page. Works with Numbers and, I think, Excel files too. But you can't copy any type of file you want to iCloud, it has to be one of the supported formats. Also, you need to have Pages/Numbers app on a device to allow syncing from iCloud to the device and to copy from Mac to iCloud.

  • How to create a workflow composite with the ability to upload a document in

    Hi,
    Is there any way to attach/upload a document while creating or modifying a user.
    I have a requirement where user will create a document(.xls/.csv/.doc) with his details and he needs to upload that document while updating the profile. If he is creating the profile then this document has to be forwarded to his manager. By validating the document manger will approve the request.
    Any help on this is greatly appreciated.
    Regards,
    mahantesh

    Use a JFrame and paint on the content pane. Or a Frame with a Canvas (who the heck still uses AWT?).
    They probably don't do anything because painting a button is not enough. It actually needs to be a button. Or Menu.

  • Uploading the document giving error in CV01n transaction

    Hi All,
       I created one content repository in ECC 5.0, when i was created that time it was giving the error http 401..etc. I solved it by entering the Content server Administrator username and password.
    After creating the content repository, i am trying to upload the document using the transztion cv01n in xls format.It is giving the following error Error while checking in and storing: C:\Documents and Settings\Sridhar\Desktop\DailyChecking.xls Message no. 26253..
    Is there any wrong in that configuration or what?
    Can i have solution for this problem?  Please let me know...
    Thanks & Regards,
    Sridhar M.

    Hi Sridhar
    The path in dc20 C://abc is the path where the temporary files wud be stored..
    For example, when u double click a checked in document, it will open the file and a temporary file would be created in the path mentioned in dc20 against data carrier PC..
    The path mentioned is the area where these temporary file should be stored while u process an original application file..
    If u dont want any temporary files to be stored in ur desktop, simply do not put anything in the path..
    Regards
    Aby
    Please award points if u find the answer useful

  • Mass upload of Documents/Folders in SolMan?

    Hi,
    We have a situation here. All the project documents and other documents are stored on the company portal. For any given process, they have a set of documents associated with it.
    Example: for a change request, they have at least  10 - 12 documents which follow a chain and are dependent. All these 10-12 documents are stored in a folder "Change Request Documents".
    There are close to 200 such folders on the portal and each folder has between 20 to 50 documents. Is there any way that we can import all the folders with the same hierarchy structure in SAP Solution Manager?
    Do we need ABAP program? What is the best possible way other than manual upload?
    Appreciate suggestions.
    Thanks,
    Krish

    Hi Aditya
    If you start doing 1 by 1, you'll go mad , as you said, there are more than 2 lakh documents are there.
    You can upload documents by using LSMW. To be safer side, you can upload 1000 documents at one shot.
    Otherwise you can ask your ABAPer to write a BDC.
    Good luck.
    Amaresh Makal

  • Upload Multiple documents in SharePoint document Library not working

    Hi All,
            I have folder on my desktop which consists of nested folders and files(Total 11 files) .And when I select "Upload multiple files" option to upload documents and drag the folder from the desktop in pop-up window .
             The sharepoint document library uploads only 1 file among all the nested folders from 11 files.Can any one help me how can I solve this
    Thanks, Quality Communication Provides Quality Work. http://siddiq-sharepoint2010.blogspot.in/ Siddiqali Mohammad .

    Hi,
    I understand you encountered the issue when use "Upload Multiple Documents" to Drag Files and Folders to upload window.
    When you say "The sharepoint document library uploads only 1 file among all the nested folders from 11 files", do you mean you have drag all files and folders to the window, while only 1 file is uploaded sucessfully? Or you cannot find all expected
    folders and files?
    Please manually open "Windows Explorer" to locate files and drag files from "Windows Explorer", instead of using the "Open window"
    opened by "Browse for files instead" as below:
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Datalist with scrollbar, can't get it to work

    Hi all there, I've tried this over and over, but i can't get this to work; I have selected an picture (thumbnail) AND selected a vertical scrollbar (with shift click) The scrollbar is from catalyst itslef, so not a custom made 1. I then (with again b

  • EXIT NAME OR BADI FOR FIELD IN MIGO TRANSACTION

    Hai all, In MIGO transaction,  I want to know the BADI or EXIT NAME in which the following fields are avilable . Fields name: exgrp, EXCISE_ACTION exact screen field name is : J_1IEXHEAD-EXGRP                                          J_1IEXHEAD-EXCIS

  • Http configuaration in sendr

    hi Q:how can i  configure the sender Http adapeter what r the steps we need ? plz send me any one hv the http to idoc ? Thanks upendrakumar

  • Oracle Database & Zones

    We are moving our Oracle Database from Solaris 10 to Solaris 11.2. Is there advantage and disadvantages  of running the Database in Kernel Zone?

  • Automatic restart of LNR0208C NVR after electrical power failure?

    Dear all, In view of the type of Power off/on button the LNR0208C has (button, no switch), does anybody know if it restarts automatically after an electrical power shutdown and reset? The D-link DNR-326 NVR does have that function, and I think it is