File Upload - Delete Documents

Hi all,
how can I delete single files of a Document Info Record. Only found BAPI to delete the entire DIR.
Add. INFO:
The Upload is done in the Document Management System (/cv01-2-3-4n) by a BSP application / BAPI_DOC_CREATE and CHECKIN .
Thanks in advance,
Christoph
Message was edited by: Christoph Aschauer

Hi Christoph,
- read Document Info Record with BAPI BAPI_DOCUMENT_GETDETAIL2. Table documentfiles contains your files.
- check out the file you want to delete using BAPI BAPI_DOCUMENT_CHECKOUTSET2.
- use BAPI BAPI_DOCUMENT_CHANGE2 to change the Document Info Record. Table documentfiles must contain your files including the one you want to delete. Before calling the BAPI, set field 'deletevalue' to 'X' in the record, that represents the file you want to delete.
Dont' forget to COMMIT WORK.

Similar Messages

  • File Upload using PRC API's

    Guys,
    I am trying to upload a new document using PRC API's. Below is required code snippet that i am using.
    IRemoteDocument remoteDoc = documentManager.createRemoteDocument(folderID,dataSourceID,document.getPath()); remoteDoc.setOverrideName(document.getName()); remoteDoc.setOverrideDescription(document.getDescription()); remoteDoc.setType("http://www.plumtree.com/dtm/mime", document.getFileType());int docID = -1;docID = remoteDoc.save();
    dataSourceID - ID of my file upload datasource , document - is my java object which has all the document related properties such as , name , description , MIME type of document etc..Below is different document path's(scenarios) that I have triedc:\work\sample.txt\\servername\work\sample.txthttp:\\appserver:7001\appName\uploadfiles\sample.txt
    When I execute this code from my application i get a below error.
    com.plumtree.remote.prc.PortalException: null; nested exception is: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument(vDocumentLocationBagAsXML == '<?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><I N="PTC_DTM_SECT">1001</I><S N="PTC_DOC_ID">application/msword</S><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>', lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == <?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><S N="PTC_DOC_ID">application/msword</S><I N="PTC_DTM_SECT">1001</I><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>, lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at com.plumtree.remote.prc.DocumentWrapper.save()
    Below is my environment.Plumtree is running on Weblogic 8.1 (Solaris OS) , ptupload webservice is running on weblogic8.1 solaris,My upload document portlet is running on weblogic 8.1 (Windows OS)
    If anyone has any working sample code please send it to my ID [email protected] or else please upload it here.Thank You ,
    Dan.

    make sure your modjk logs don't have any errors.
    Here's a peice out of my httpd.conf
    #ADDed Oct 15,2003, seemed to remove modjk error
    AddType multipart/form-data .gif .png  .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
    Also did you compile jk2 from source???
    com.oreilly.servlet --- cos
    http://www.servlets.com/cos/index.html
    http://www.servlets.com/cos/cos-05Nov2002.zip
    But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
    here are the version numbers of software I use, and have compiled all from source.
    apache-httpd-2.0.47
    tomcat-4.1.27
    jk2-connectors-2.0.2

  • Not able to upload file in DMS(Document Mang. system) using Web dynpro ABAP

    Hi All,
    I am facing a problem while uploading the file into the DMS ( Document Management System ) from Webdnrpo .
    I am using the BAPI - BAPI_DOCUMENT_CREATE2 to create the document .
    CASE - 1
    when i am providing the storage category mention below and no data carrier1
    ls_documentfiles-storagecategory = 'ZHMEL_CS'.  it is not able to upload the document in the DMS system and when i check
    in the debugg mode it giving error as  ""Error while checking in and storing: C:\TEST.TXT "" .
    CASE - 2
    When i am not using the storage category and providing the the data carrier as default
    ls_documentdata-DATACARRIER1 = 'DEFAULT'. It is able to create the document in the DMS but i am not able to read that document .
    I checked with DMS Consultant that DMS is configured for  ZOL ( documenttype) with a storage category  as 'ZHMEL_CS'.
    The code which i have used is below :
    ls_documentdata-documenttype = 'ZOL'.
    ls_documentdata-documentversion = '00'.
    ls_documentdata-documentpart = '000'.
    ls_documentdata-description = 'Test Document'.
    ls_documentdata-laboratory = '001'.
    ls_documentdata-WSAPPLICATION1 = 'TXT'.
    ls_documentdata-DOCFILE1 = 'C:\TEST.TXT'.
    ls_documentdata-SAVEDOCFILE1 = 'C:\TEST.TXT'.
    *ls_documentdata-FILESIZE1 = 000000000000.
    *ls_documentdata-FILESIZE2 = 000000000000.
    ls_documentdata-WSAPPLICATION1 = 'TXT'.
    ls_documentfiles-DOCUMENTTYPE = 'ZOL'.
    ls_documentfiles-DOCUMENTPART = '000'.
    ls_documentfiles-DOCUMENTVERSION = '00'.
    ls_documentfiles-storagecategory = 'ZHMEL_CS'.
    ls_documentfiles-WSAPPLICATION = 'TXT'.
    ls_documentfiles-DOCPATH = 'C:\'.""lv_filename.
    ls_documentfiles-DOCFILE = 'TEST.TXT'."lv_filename.
    ls_documentfiles-description = 'Test Document'.
    ls_documentfiles-language = 'EN'.
    ls_documentfiles-CHECKEDIN = 'X'.
    APPEND ls_documentfiles to lt_documentfiles .
    *&----Fill Descriptions
    w_descr-language = 'EN'.
    w_descr-language_iso = 'EN'.
    w_descr-description = 'Test'.
    append w_descr to lt_descr.
    clear w_descr.
    **w_hostname = 'HMEL-DV1R3_DR3_00'.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
    documentdata = ls_documentdata
    *hostname = 'content-srv'
    *pf_http_dest = 'SAPHTTPA'
    *pf_ftp_dest  = 'SAPFTPA'
    IMPORTING
    DOCUMENTNUMBER = lv_DOCUMENTNUMBER
    return = gv_return
    TABLES
    documentdescriptions       = lt_descr
    documentfiles              = lt_documentfiles.
    Please let me know your valuable inputs on the same ..
    Edited by: Omm Awasthi on Dec 30, 2010 12:22 AM
    Edited by: Omm Awasthi on Dec 30, 2010 12:25 AM

    Hi omm , from functional side your require a document type and content repository
    I have used below code in a function module to create document , we have create object link as PO to the doc.
    FUNCTION ZFM_SR_CREATE_FROM_EXTERNAL .
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(IV_DOCUMENTNUMBER) TYPE  DOKNR OPTIONAL
    *"     VALUE(IV_DOCUMENTTYPE) TYPE  DOKAR OPTIONAL
    *"     VALUE(IV_DOCUMENTVERSION) TYPE  DOKVR OPTIONAL
    *"     VALUE(IV_DOCUMENTPART) TYPE  DOKTL_D OPTIONAL
    *"     VALUE(IV_STORAGE_CAT) TYPE  CV_STORAGE_CAT OPTIONAL
    *"     VALUE(IV_DOKST) TYPE  DOKST OPTIONAL
    *"     VALUE(IT_DM_FILES) TYPE  ZDM_TT_FILES OPTIONAL
    *"     VALUE(IV_EBELN) TYPE  EBELN
    *"  EXPORTING
    *"     VALUE(EV_DOCUMENTNUMBER) TYPE  DOKNR
    *"     VALUE(ES_RETURN) TYPE  BAPIRET2
    V00.00  DD.MM.YYYY                                                   *
    *********************New Method of Uploading File*********************************
      CONSTANTS path_name    TYPE dms_path
               VALUE '/tmp/'.
      CONSTANTS log TYPE dms_path VALUE '/tmp/logFO.txt'.
      DATA: ls_draw TYPE bapi_doc_draw2,
            lt_documentfiles TYPE TABLE OF bapi_doc_files2,
            ls_documentfiles TYPE bapi_doc_files2,
            ls_dm_files TYPE zdm_files,
            lv_filename TYPE string,
            lv_ext TYPE string,
            lv_file_type TYPE draw-dappl,
            lv_file_name TYPE dms_path,
            lv_msg(80) TYPE c,
            lt_objectlinks TYPE TABLE OF bapi_doc_drad,
            ls_objectlinks TYPE bapi_doc_drad,
            lv_ebelp   TYPE ebelp
    Prepare Data
      MOVE iv_documentnumber TO ls_draw-documentnumber.
      MOVE iv_documenttype TO ls_draw-documenttype.
      MOVE iv_documentversion TO ls_draw-documentversion.
      MOVE iv_documentpart TO ls_draw-documentpart.
      ls_draw-statusextern = iv_dokst.
      ls_draw-statusintern = iv_dokst.
      ls_draw-username = sy-uname.
      LOOP AT it_dm_files INTO ls_dm_files.
        SPLIT ls_dm_files-filepath AT '.' INTO lv_filename lv_ext.
        CALL FUNCTION 'CV120_DOC_GET_APPL'
          EXPORTING
            pf_file   = ls_dm_files-filepath
          IMPORTING
            pfx_dappl = lv_file_type.
        TRANSLATE lv_file_type TO UPPER CASE.
        OPEN DATASET log FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        TRANSFER lv_ext TO log.
        ls_documentfiles-wsapplication = lv_file_type.
        TRANSLATE ls_documentfiles-wsapplication TO UPPER CASE.
        CONCATENATE path_name
                           lv_filename
                            lv_ext
                            INTO lv_file_name.
        CONDENSE lv_file_name  NO-GAPS.
        TRANSFER lv_file_name TO log.
        OPEN DATASET lv_file_name FOR OUTPUT IN BINARY MODE MESSAGE lv_msg.
    *Transfer Attachment Content to Application Server
        TRANSFER ls_dm_files-content TO lv_file_name.
        CLOSE DATASET lv_file_name.
        TRANSFER 'move data to lt_files' TO log.
        ls_documentfiles-storagecategory = iv_storage_cat.
        ls_documentfiles-docfile = lv_file_name.
        ls_documentfiles-DOCUMENTVERSION = IV_DOCUMENTVERSION.
        APPEND ls_documentfiles TO lt_documentfiles.
        CLEAR lv_file_name.
        CLOSE DATASET log.
      ENDLOOP.
      IF iv_ebeln IS NOT INITIAL.
        ls_objectlinks-objecttype = 'EKPO'.
        SELECT SINGLE ebelp INTO lv_ebelp FROM ekpo WHERE
                                          ebeln = iv_ebeln
                                          AND loekz eq space.
        CONCATENATE iv_ebeln lv_ebelp INTO ls_objectlinks-objectkey.
        APPEND ls_objectlinks TO lt_objectlinks.
      ENDIF.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
       EXPORTING
         documentdata   = ls_draw
         pf_ftp_dest    = 'SAPFTPA'
         pf_http_dest   = 'SAPHTTPA'
       IMPORTING
         documentnumber = ev_documentnumber
         return         = es_return
       TABLES
         objectlinks          = lt_objectlinks
         documentfiles  = lt_documentfiles.
    DATA:   ls_doc_data  type bapi_doc_draw2,
       ls_doc_datax type bapi_doc_drawx2,
       ls_return type bapiret2.
    Set value for document data
      ls_doc_data-statusextern  = 'IW'.
      ls_doc_data-statusintern  = 'IW'.
    Set value for document data check
    ls_doc_datax-statusextern = 'X'.
    ls_doc_datax-statusintern = 'X'.
    CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
      EXPORTING
        DOCUMENTTYPE               = 'ROS'
        DOCUMENTNUMBER             = IV_DOCUMENTNUMBER
        DOCUMENTPART               = IV_DOCUMENTPART
        DOCUMENTVERSION            = IV_DOCUMENTVERSION
        DOCUMENTDATA               = ls_doc_data
        DOCUMENTDATAX              = ls_doc_datax
      HOSTNAME                   =
      DOCBOMCHANGENUMBER         =
      DOCBOMVALIDFROM            =
      DOCBOMREVISIONLEVEL        =
      SENDCOMPLETEBOM            = ' '
          pf_ftp_dest    = 'SAPFTPA'
          pf_http_dest   = 'SAPHTTPA'
      CAD_MODE                   = ' '
      ACCEPT_EMPTY_BOM           = ' '
    IMPORTING
       RETURN                     =  ls_return
    TABLES
      CHARACTERISTICVALUES       =
      CLASSALLOCATIONS           =
      DOCUMENTDESCRIPTIONS       =
      OBJECTLINKS                =
      DOCUMENTSTRUCTURE          =
       DOCUMENTFILES              = lt_documentfiles.
      LONGTEXTS                  =
      COMPONENTS                 =
      move es_return to ES_RETURN.
      IF es_return-type CA 'EA' ."NE 'E' AND es_return-type NE 'A'.
        "do nothing
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
      ENDIF.
      LOOP AT lt_documentfiles INTO ls_documentfiles.
        DELETE DATASET ls_documentfiles-docfile.
      ENDLOOP.
    ENDFUNCTION.

  • I cannot delete a file from the document folder.  I can move it to the trash and then empty the trash, but when I go back to the documents folder it is still there.

    I cannot delete a file from the documents folder.  I can move it to the trash and then empty it, but when I go back to the documents folder, the file is still there.

    Gay,
    I wonder what your computing environment is. Is your account being administrated by another account? Are you working in an account subject to "Parental Controls"?
    Jerry

  • 2GB of video file upload to SharePoint 2013 document library

    Hi All,
    We have a requirement of uploading a 2GB of video file to a SharePoint 2013 document library. Will there be any issue due to increasing the maximum file size?
    Many Thanks,
    sudesh withanage

    It will be better if you save all your videos at one location,i.e Asset Library.Check the link for Asset libraries
    http://technet.microsoft.com/en-us/library/ee414275(v=office.15).aspx
    In case you want to add other files (i,e excel ,word) along with videos you will need to increase library size,
    Check the following link to increase the file size ,as well as the issues and workaround to solve the problems
    http://blogs.technet.com/b/praveenh/archive/2012/11/16/issues-with-uploading-large-documents-on-document-library-wss-3-0-amp-moss-2007.aspx
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • How do I remove or delete files within a document folder? I have tried dragging the files to the trash and it does not work

    How do I remove or delete files and image files within a document foler?  I have tried dragging the files to the trash, but that is not working. 

    Right-click (or ctrl-click) on a file. If the "move to Trash" option is greyed out, select "get info" and read the permissions at the bottom of the info window.
    Wat are they?
    Do the same for the enclosing folder - what permissions does that have?

  • Simple Flat File Upload Document

    Please help me, I have the requirement to upload the flat file data in bw cube , please send me some blog link or document that give me the steps to upload the document from flat file for BMW tax data. to a Tax Cube inBW 3.5
    MY Email is [email protected] to send any help documents on flat file
    thanks
    soniya

    From help:
    http://help.sap.com/saphelp_nw04/helpdata/en/8e/dbe92341c84242be2c7d3917f1c197/frameset.htm
    Blogs of SDN:
    (not very useful)
    /people/sap.user72/blog/2006/07/03/how-to-create-ascii-text-file-for-upload-to-sap-bw 
    (useful)
    /people/sankar.kumar/blog/2006/10/11/loading-text-filestxt-into-bw-with-hex-option

  • Uploading multiple documents using file upload option

    Hi,
      I am new to BSP in file upload.Here i am trying to upload documents and Archiving the documents.At one time i am able to uplaod one document.Is there anyway of uploading of multiple documents from the same File upload control in the same session.and keeping the documents that uploaded in the page.
      Hope you will answer.Need urgent reply.
        Regards
       Usman

    before answering your question, a request
    can you reply/award points/close previous thread opened by you.
    coming to your question, check out the below given link.
    http://www.15seconds.com/issue/990723.htm
    Regards
    Raja

  • How to create a portlet to upload/delete files into portal pages

    I wanted to know if it is possible to create a simple UI wherein a user could choose a file from his HDD and upload it to the page as an item.I know this can be done by editing the page,but when the user clicks on edit he would have to use the default portal interface to do the same, i want to avoid precisely that.
    If possible then how do I go about making it.This UI would also require that the user be able to select from a list of previously uploaded files and delete some of them.This i require so that any authenticated portal user could access/downloaded the uploaded files given the url to the same.

    You can use the WebDAV feature in Portal Release 2 to provide a simple interface for uploading and managing files. In addition, the content management APIs can be used to build custom interfaces. These APIs are available for Portal 3.0.9 and will soon be available for Release 2. There is no Delete API, but one is planned for an upcoming release.
    Regards,
    Jerry
    PortalPM

  • Create new project files with uploaded word document

    How do I create a new project file with an uploaded word document.  I tried to follow the guidelines using the Robohelp PDF file but after I upload the word document, I cannot see it in the workspace.  Are there other steps to bring the document into Robohelp 9.  I am using the trial version and have never used Robohelp before.
    Thank you!

    I was finally able to fix my problem and I hope to publish this in as many pages as I can.  First I had the exact same issue.  My file was password protected (the one I used as a shell for a new project) spent two hours of work, went home and next
    day “Nothing” same errors.  Cannot open file etc. etc.  So after two hours searching the net I found this company that has a
    Project Repair Toolbox that is cloud based for FREE (no useless downloads).
    I went in > It asked me for the file that I had on my local drive > prompted me for the password and > BAM! the file opened right up.  Since it as viewer only I was able to at least begin re-typing the project plan which was small in nature.
     Check it out, hope it works for you. 
    http://www.project.repairtoolbox.com/

  • Re: camera connection kit- I uploaded pictures using the sandisk connection, clicked on 10 pics to delete and ALL of my files were deleted from the sandisk! Is there any way to recover these pics?

    Re: camera connection kit- I uploaded pictures using the sandisk connection, clicked on 10 pics to delete and ALL of my files were deleted from the sandisk! Is there any way to recover these pics?

    Kevin-
    You say you uploaded the pictures to the iPad?  Then they should still be there, and you can copy them to your computer through iTunes.
    There are utility programs for a computer that can recover deleted files from hard drives, and they may work for camera memory cards as well.  I've used DiskWarrior for Macintosh to recover pictures from an SD card before.
    Fred

  • Is there a way to create a file upload page for uploading large documents to a ftp site in Muse?

    I am building a site for a printing company and wanted to know if there was a way to build in a ftp file upload page or button?

    No that is not possible with Muse alone. YOu can host it on Business Catalyst and upgrade the hosting plan to at least the webMarketing plan for general uploading. If it requires each user to have their own profile etc, then you will need to use BC webApps

  • How to open hyperlink of PDF file uploaded at SharePoint(hosted at Office365) in 'Adobe Acrobat' for annotation and comments.

    Hi,
    I've a hyperlink of PDF file which is uploaded under SharePoint Document library(hosted at Office365 E1) on my custom '../SitePages/Approver.aspx'. Once user click on that hyperlink it should ask me to "Check-Out & Open' pdf file directly from sharePoint document library then it should automatically gets opened into 'Adobe Acrobat' where user will do some annotation/ comments in that pdf file & again 'Check-In' back his changes to SharePoint Document library.
    Following article will explain how I want to Check-In & Check-Out  pdf files from SharePoint document library once i click hyperlink on my '../SitePages/Approver.aspx' page.
    acrobatusers.com/tutorials/how-to-work-with-sharepoint-and-office-365
    Please let me know how to achieve this functionality using office 365.
    Your assistance would be greatly appreciated as this is top-priority requirement for us.
    Yours sincerely,
    Mahesh Sherkar
    [signature deleted by host]

    For instance, the forms.conf file:
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "D:\Oradev/forms/java/$1"
    # Virtual path for JInitiator downloadable executable and download page
    AliasMatch ^/forms/jinitiator/(..*) "D:\Oradev/jinit/$1"
    # Virtual path for runform.htm (used to run a form for testing purposes)
    AliasMatch ^/forms/html/(..*) "d:\oradev/tools/web/html/$1"
    # Virtual Path for icons
    AliasMatch ^/forms/icons/(..*) "d:\icons/$1"
    ...you can move your files in one of the existing physical directories - e.g: d:/icons - and call them with the following:
    Web.show_Document('/forms/icons/document.pdf','_blank');But you can also add your own virtual/physical directory:
    # Virtual Path for documents
    AliasMatch ^/forms/documents/(..*) "d:\documents/$1"
    ...with the following code:
    Web.show_Document('/forms/documents/document.pdf','_blank');Francois

  • Problem with Multi File upload example, help needed

    I got the code from the following location.....
    http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html
    And I've got it to work to some degree except I cant get the file transfer to work when pressing, Upload.   Below is what my debugger outputs.  Any thoughts on how to fix this or even what it means?
    At the very bottom of this message is the upload.cfm code.......
    Thanks in advance for the help
    <html>
    <head>
      <title>Products - Error</title>
    </head>
    <body>
    <h2>Sorry</h2>
    <p>An error occurred when you requested this page.
    Please email the Webmaster to report this error.
    We will work to correct the problem and apologize
    for the inconvenience.</p>
    <table border=1>
    <tr><td><b>Error Information</b> <br>
      Date and time: 12/07/09 22:25:51 <br>
      Page:  <br>
      Remote Address: 67.170.79.241 <br>
      HTTP Referer: <br>
      Details: ColdFusion cannot determine how to process the tag &lt;CFDOCUMENT&gt;. The tag name may be misspelled.<p>If you are using tags whose names begin with CF but are not ColdFusion tags you should contact Allaire Support. <p>The error occurred while processing an element with a general identifier of (CFDOCUMENT), occupying document position (41:4) to (41:70).<p>The specific sequence of files included or processed is:<code><br><strong>D:\hshome\edejham7\edeweb.com\MultiFileUpload\upload.cfm      </strong></code><br>
      <br>
    </td></tr></table>
    </body>
    </html>
    <!---
    Flex Multi-File Upload Server Side File Handler
    This file is where the upload action from the Flex Multi-File Upload UI points.
    This is the handler the server side half of the upload process.
    --->
    <cftry>
    <!---
    Because flash uploads all files with a binary mime type ("application/ocet-stream") we cannot set cffile to accept specfic mime types.
    The workaround is to check the file type after it arrives on the server and if it is non desireable delete it.
    --->
        <cffile action="upload"
                filefield="filedata"
                destination="#ExpandPath('\')#MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique"
                accept="application/octet-stream"/>
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('\')#MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
            </cfif>
    <!---
    Should any error occur output a pdf with all the details.
    It is difficult to debug an error from this file because no debug information is
    diplayed on page as its called from within the Flash UI.  If your files are not uploading check
    to see if an errordebug.pdf has been generated.
    --->
            <cfcatch type="any">
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>

    Just 2 things in my test:
    1) I use no accept attribute. Coldfusion is then free to upload any extenstion.
    Restricting the type to application/octet-stream may generate errors. Also, it is unnecessary, because we perform a type check anyway.
    2) I have used #ExpandPath('.')#\ in place of #ExpandPath('\')#
    <cfif isdefined("form.filedata")>
    <cftry>
    <cffile action="upload"
                filefield="filedata"
                destination="#expandPath('.')#\MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique">
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('.')#\MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
                <cfoutput>Uploaded file deleted -- unacceptable extension (#ucase(File.ServerFileExt)#)</cfoutput>.<br>
            </cfif>
    Upload process done!
            <cfcatch type="any">
                There was an error!
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>
    <cfelse>
    <form method="post" action=<cfoutput>#cgi.script_name#</cfoutput>
            name="uploadForm" enctype="multipart/form-data">
            <input name="filedata" type="file">
            <br>
            <input name="submit" type="submit" value="Upload File">
        </form>
    </cfif>

  • File Upload Submit Woes

    We have a file upload page. We have added a custom table to store the files, based on the How Tos docs on OTN. The issue that we are having is that if there is anything in the file upload control and a user switches to another page in the app via a tab, the file upload page is automatically submitted (the custom PL/SQL does not fire because it is tied to the submit button) and the file is stored in the WWV_FLOW_FILE_OBJECTS$ table not the custom table. What is auto submitting this page when the tab is used to transition to another page? When you hover over the tab you see the doSubmit() function call. Is there a way around this?

    well, that's not exactly what i meant, but it's no matter because i steered you wrong (sorry about that; was doin' like 8 things at once)...
    what i meant was for you to conditionally fire your process based on the values of :REQUEST that could be set when your page was submitted. so rather than using your current tab's name in your condition, i was suggesting you use the tab names from the other tabs on which your users are clicking to "accidentally" submit their documents. where i steered you wrong is that processing doesn't occur on pages when the user tabs out of them like that. so your after_submit pl/sql won't run regardless of your conditions if your users are tabbing out of that page. the easiest way i can (now) think of to handle this case would be to do that processing elsewhere. so when your user tabs off your page, your "File Browse..." item will be populated with a new value. you could have before header processes on your pages to which your users are tabbing to properly move the uploaded files to your table in cases where that item was just updated. so to put this in the context of the how-to doc...
    say your users are tabbing off your file upload page to either page 4 or 5 of your app. i'm suggesting you add processes to those pages that run the...
    <from howto>
    insert into file_subjects(id,NAME, SUBJECT, BLOB_CONTENT, MIME_TYPE)
    select id,:P2_FILE_NAME,:P2_SUBJECT,blob_content,mime_type
    from wwv_flow_files where name = :P2_FILE_NAME;
    delete wwv_flow_file_objects$ where name = :P2_FILE_NAME;
    </from howto>
    ...code if the value of P2_FILE_NAME was just updated (you can, of course, check to see if it was updated by storing the "old" value elsewhere and comparing to the current). this is the processing that you're unable to currently fire, and i'm just suggesting you do it on the next page(s) rather than the current one.
    hope this helps,
    raj

Maybe you are looking for

  • Cant't get my ipod nano 6th gen to stop repeating

    I use the shuffle on the playlists,songs,genres,albums etc and when a song plays it repeats itself. I don't know what I did but I would like to turn off the repeat of the song..any help with this? I cant seem to find it on this new nano.thanks

  • Consistency error:more fields found in XML structure than specified in conv

    Hi, I am doing a File 0 RFC- File in PI 7.1 and facing the following error: 2009-12-07 09:45:05 Error        MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Exception in XML P

  • Transfering data to new G5

    Pardon my ignorance but - I have an iMac G3 and would like to purchase a new G5 and I was wondering if I could simply connect the two via the USB port and tranfer files from old to new. thanks for your help, Rick

  • Inspection lot without any financial entries

    Hello experts , Whenever we are receiving the GR from procurement and Production , the stocks are valuated as it is having financial entrees. Is their any way in QM, we can make the valuation during  the UD,  the inspection lot contains the material

  • Update in Mac App Store, just not for my account

    My Mac App Store tells me that I've got at update for one of my programs, but when I open Mac App Store it's a update for Angry Birds, a game I don't have on my mac. When I press update a pop-up appears and say I need to login with [email protected]