Retrieving desired file name in fileFormat plugin

Hello all!
I'm having trouble finding out how to retrive the desierd file name in my experimental file format plugin. I've used SimpleFormat as a starting point and after i tracked down the datastructure of the file I'm supposed to write, all I can find is a handle to a write descriptor. Dead end as far as i coul'd see.
The thing is, I need to manipulate the file from another process outside of photoshop, and therefor I need to communicate the name of the file the user saved out of the plugin to be used at a later time.
It seems to me the process of file handeling is designed to be opaque?
Edit; oh I forgot, this is on OS X...

PIFormat.h version 11 (Photoshop CS4) added this item to the record.
uint16 *finalSpec;
/**< A utf16 encoded string that contains the location of the final file. Use this for reference only.This will give you the parent folder and the name of the final file.
Read and write via the @ref fileSpec2 only and not this value. */

Similar Messages

  • Retrieving the file name in the adapter module in the sender file adapter

    hi,
    i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
    After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
    Also is it possible to retrieve the archive directory path in module?
    Regards,
    Meenkashi

    Hi Meenakshi,
    I guess you are looking for this
    /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Regards
    Suraj

  • How to retrieve various file names from a filepath of application server

    Hi All,
    I am using a FILEPATH  of application server which can have multiple file names i want to retrieve data from all the existing files.
    i am using FM "GET_NAME_FILE" but it is applicable only for file name.
    so my question is how to fetch various file names of particular filepath.
    Thanks in advance.

    Hello Mayank,
    You can use the below FM and code
    PARAMETERS: p_file TYPE rlgrap-filename.
    ***AT Selection-Screen*******
    AT SELECTION-SCREEN ON  VALUE-REQUEST FOR p_file.
    ***Function  module for F4 help from Application  server
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    * EXPORTING
    *   DIRECTORY              = ' '
    *   FILEMASK               = ' '
       IMPORTING
       serverfile             =  p_file
       EXCEPTIONS
       canceled_by_user       = 1
       OTHERS                 = 2
      IF sy-subrc = 0.
        MESSAGE 'Successful'  type 'I'.
      ENDIF.
    Regards,
    Mithun Shetty

  • Retrieving original file name

    Recently changed file names and now need to revert back to the original file name created via camera.  Can this be done in LR 4 or is this info deleted?
    Thanks!

    It depends on where you did the rename.....if you did it in Lightroom then yes the original file name is retained (see the Metadata Panel for old and new names). But if you renamed before importing, then no, Lightroom will have no record of the original name.

  • Retrieve file name from full file path

    I am trying to retrieve a file name from a path (ex. c:\temp\tes.txt) using the following code, but it is given me an error of "The method split(String) in the type String is not applicable for the arguments (char).
    {code}
    String filepath = item.getName();
    String[] buf = filepath.split('/');
    String filename = buf[buf.length-1];
    {code}
    I tried to use double quote instead of single quote, but it is not returning anything.
    {code}
    String[] buf = filepath.split("/");
    {code}
    Anyone knows why? Thanks.

    How is this related to JDBC?
    Anyway, is the path separator actually a forward slash? Isn't it a backward slash?
    If you're using Apache Commons FileUpload (which I guess, the 'item.getName()' is recognizeable), then just read their FAQ: [http://commons.apache.org/fileupload/faq.html#whole-path-from-IE].

  • Retrieving file name using web agent

    When uploading to the database using interMedia web agent and an HTML form, is the file name (as well as the file contents) passed to the agent?
    If so, how does one retrieve the file name on the server side?
    Thanks for insight.
    -John

    Hi John,
    OK, you got me thinking, so I just had to look :-) Turns out its not in the documentation as such. Its in the doc changes section at the end of the README. (Because, now I really think about it, I added the code after the docs were last updated).
    Simon

  • How to allow user to select pdf file on local machine and populate field with file name only

    Folks,
    I have a project requirement that I am stumped on.  I am admittedly a novice, so forgive questions that may seem obvious.
    My requirement is a form running on a client system where the user can click a button and select a PDF file name from a PDF on their local machine and then populate a form field with that file path & filename.  The file names vary between all machines, so there is no static list.  Note that the PDF is not embedded, nothing is executed, I simply need the file name.
    There are several of these on a form (20+), so manual name entry is too error prone.   I would like to use a 'browse' type dialog, but can not figure out how to implement it.
    I've looked at app.browseForFile, but the users can not install a javascript file in their adobe folder or any other files;  the functionality has to be integral with the original PDF. 
    Functionally, this is no different from the image object file browse, except that I need a PDF instead of an image file, so there doesn't seem like there should be a security issue that is any different from those surrounding the image object.
    I've been stumped on this for the entire week, and I have a deadline rapidly approaching, so any examples or suggestions (please remember I'm a novice) would be greatly appreciated! 

    Thanks for the reply Paul - do you have any sample code of how to attach the PDF?  Or how the user can select a PDF to open?  I might be able to attach it, retrieve the file name, and then un-attach it.
    Alternatively, do you know how to retrieve the file name from the imagePath object?  It will let you select PDF files, but I can't find info on how to retrieve the file name.   It should be the way you would retrieve the file name for an image.
    As a novice in this, thanks for your help and patience!

  • File name in the Receiver Adapter

    Hi,
    I need to create a file with the name as ZZZCCYYMMDDHHMMSS.txt
    where ZZZ is the constant
    CCYYMM is the date of file creation
    DDHHMMSS is the time of file creation.
    There MUST NOT be any spaces in the file name
    Eg ZZZ20110314152530.txt
    I am using the Receiver File Adapter with Cntent Conversion. I tried using Add Time stamp option. But that does not sattisfy the required Naming conventions for file name.
    Any help would be appreciated.
    Regards
    Harry

    Hi Harish,
    Your requirement is to generate a dynamic file name @ target side right??
    If so best option is go for  UDF. (I hope you heard about UDF already)
    There is something called ASMA... (check it out)
    Have a look @ following. So that you can get some Idea about ASMA
    In Google Type : dynamic file name in Pi
    Select 1st link- sap technical
    After this try to write own UDF to get desired file name @ target side..
    Thanks,
    Saravanan

  • Can I use data entered in PDF form's field(s) to auto-populate Save As file name?

    Hello,
    I want to automate, as much as possible, the "Save As" process by using some of the data that the user entered in the fillable PDF form.
    For example, I want to include the user's First Name and Last Name that they entered in the form to be part of the saved file name.
    First Name: Bob
    Last Name: Smith
    Therefore, when you select to Save As part of the new file name will already have <BobSmith><today's date>.PDF
    Form was created using LiveCycle Designer 11
    PDF version: 1.7, Adobe Extension Level 8 (Acrobat X)
    Thanks for any information that you can share.
    Regards,
    Roch

    You should try the LiveCycle Designer forum, but from my experience with Acrobat forms it's not possible. What you can do is either save the file using the desired file name and path (without user interaction), if the script runs from a trusted context, or you can prompt the user with the desired file-name for the file, but not enforce them to use it, nor populate it into the Save As dialog itself.

  • Getting Receive File Name and status of application from Biztalk database.

    Hello all,
    I want to retrieve Receive file name and status of application (started, partially started) in a stored procedure
    querying Biztalk databases.
    Please share if anybody have an Idea.
    Thanks

    Hi Nilesh,
    Status of BizTalk application can be obtained using ExplorerOM API provided by product. It's Application class has a Status property that returns one of Not Applicable, Started, Stopped, Partially Started.
    using Microsoft.BizTalk.ExplorerOM;
    private string GetApplicationStatus(string applicationName)
    BtsCatalogExplorer catalog = new BtsCatalogExplorer();
    string status = "";
    try
    //connection string to BizTalk management database
    catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI";
    Microsoft.BizTalk.ExplorerOM.Application app = catalog.Applications[applicationName];
    if (app == null)
    throw new Exception(String.Format("Application '{0}' cannot be found.", applicationName));
    status = app.Status.ToString();
    catch (Exception ex)
    //Handle exception
    System.Diagnostics.EventLog.WriteEntry("MyMonitoryingApp", "Exception call stack: " + ex.ToString());
    finally
    if (catalog != null) { catalog.Dispose(); }
    return status;
    UPDATE: Found the thread from where I got this code. Thanks to Ashwin for providing it.
    Refer:
    Reg Stored Procedures for BizTalk Application Status in BizTalk Admin Console
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Current Date in file name

    Hi gurus,
    I export daily a report to csv using RSCRM_BAPI ... I need to the put the date of the extraction in the file name (export_csv_120506.csv) ... It's possible ?
    export_csv_ + "sysdate" ... something like that ?
    Thanks in advance for your help,
    Alex

    Hi,
    I would suggest you to write an UNIX shell script (if it suits your environment) to rename from whatever existing fileanme to your desired file name.
    Hope this helps.
    Thanks,
    Raj

  • Output file name in publication object

    Hello,
    I trying to change the default delivery behavior of publication object via C#.
    I have a publication object which contain some source reports (CR 2008) and CR report which is the dynamic recipient source.
    I need to retrieve full file name and path of output report from dynamic recipient source (e.g. C:\Myfolder\Recipient_ID\recipient_name.doc), and retrieve only file name from dynamic recipient source and send file via email (e. g. recipient_name.doc)
    I also want to manipulate some additional parameters from dynamic recipient source like report date (not start date of publication). Default behavior of CMC is that I have only few placeholders.
    Can I do it programatically?
    Thanks.

    Hi Leon.
    I have the same trouble with publication filename.
    How can I proceed to assign dinamicaly a filename to a bobj publication?
    I have some crystal Reports that take data from SAP Queries.
    And I have joined together the crystals in one publication on the BOBJ portal.
    My problem start when I try to assign a filename to the PDF result of the publication.
    The options I have are not sufficient because I need it to be according to the filter of the SAP queries,
    just to know exactly by the filename, what's the Crystal PDF result about.
    I have that descriptions in a SAP queryable infoobject.
    Is it possible to do what I want.
    Please how can I proceed or how could I do something similar.

  • B2B 11g - Managing File name from a JMS queue.

    Hi,
    I have configured a Listening Channel to use Generic File 1.0 (to poll a file from local dir) and send it to a Trading Partner. In B2B User Guide it has been said to have the file name as %TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%_%MESSAGE_ID%_TIMESTAMP.txt. Extension can be anything (txt, dat, etc).
    It is necessary to have this format? What if I want to send a file with name say ABC.txt*.
    How will I manage this file name pattern if I have to read the file content from a JMS queue (and then send the file to the Trading Partner).
    Thanks,
    Sanjay
    Edited by: Sanjay Bharatiya on 24-Nov-2010 12:07 PM

    Hi Anuj,
    I set up AS2 in my local environment and tested it. I do not get the desired name of the file. The wire message seems to be ok. Following is the Tranport Header present in the wire message from the sender B2B server:
    Message-ID=<ID:<172014.1291742389684.0>@kg_certificate> Content-Transfer-Encoding=binary MIME-version=1.0 From=kg_certificate Disposition-Notification-To=[email protected] AS2-To=exel_certificate User-Agent=AS2 Server Date=Tue, 07 Dec 2010 17:19:50 GMT AS2-Version=1.1 AS2-From=kg_certificate Content-Disposition=attachment; filename=J7Q9A7.txt Content-Type=*application/octet-stream*
    Following is the Transport Header present in the wire message from the receiver B2B server:
    AS2-To=exel_certificate TE=trailers, deflate, gzip, compress Date=Tue, 07 Dec 2010 17:19:50 GMT AS2-Version=1.1 Accept-Encoding=gzip, x-gzip, compress, x-compress AS2-From=kg_certificate Content-Transfer-Encoding=binary Disposition-Notification-To=[email protected] Message-ID=<ID:<172014.1291742389684.0>@kg_certificate> Content-type=application/octet-stream MSG_RECEIVED_TIME=Tue Dec 07 12:20:39 EST 2010 ECID-Context=1.0000In1qASoEoI05nzp2iZ1Cxam9001KGU;kXCmv0 MIME-version=1.0 User-Agent=AS2 Server Oracle HTTPClient Version 10h Content-Disposition=attachment; filename=J7Q9A7.txt Content-Length=211 Host=10.32.200.207:8001 Connection=Keep-Alive, TE From=kg_certificate
    Things look good here but when the file is written to a directory the file name is of the form <sendername>_<doctypename>_<docrevision>_<msgtype>_*****.dat. I do not get the desired file name (J7Q9A7.txt). What am I missing?
    Thanks,
    Sanjay
    Edited by: Sanjay Bharatiya on 7-Dec-2010 11:59 AM

  • How to obtain actual file name of a FILESTREAM file.

    When a file is added to a FILESTREAM Blob field in SQL Server 2008 the file is renamed to something like 0000001c-0000019c-0004. Is there a way to retrieve this file name after a file is added?  I thought that [BLOB_Field].PathName() was promising
    but this turns out to be some sort of virtual filepath that is only used when accessing the file through the filesystem and not via T-SQL. Any ideas?

    Many Thanks to Kevin and Jacob, from your help I've been able to whip up a solution. It hasn't been throughly tested but seems to be what I'm looking for.
    If you want to use this solution, you'll need to add the following Stored Procedures to your FILESTREAM database.
    CREATE
    PROCEDURE
    [dbo].[procDBCC_PAGE]
    @db_name varchar
    (500),
    @filenum INT
    @pagenum INT
    AS
    BEGIN
    SET
    NOCOUNT
    ON
    DBCC
    TRACEON (3604);
    DBCC
    PAGE (@db_name, @filenum, @pagenum, 3) WITH
    TABLERESULTS;
    SET
    NOCOUNT
    OFF
    END
    GO
    CREATE
    PROCEDURE
    [dbo].[procFindLogSequenceNumber]
    @TableName varchar
    (500),
    @FileLedgerID varchar
    (500), --INT Causes error "Conversion failed when converting the varchar value '0x08166000' to data type int"
    @LogSequenceNumber varchar
    (500) OUTPUT
    AS
    SET
    NOCOUNT
    ON
    DECLARE
    @db_name varchar
    (500)
    DECLARE
    @filenum INT
    DECLARE
    @pagenum INT
    DECLARE
    @parent_object varchar
    (500)
    SET
    @db_name = db_name
    CREATE
    TABLE
    #AllocationMetadata ([filenum] INT
    , [pagenum] INT
    INSERT
    #AllocationMetadata ([filenum], [pagenum]) EXECUTE
    sp_AllocationMetadata_FileNum_PageNum @TableName
    --My Primary Key ID column is named FileLedgerID
    SET
    @filenum = (SELECT
    TOP
    1 [filenum] FROM
    #AllocationMetadata)
    SET
    @pagenum = (SELECT
    TOP
    1 [pagenum] FROM
    #AllocationMetadata)
    CREATE
    TABLE
    #DBCC_PAGE_Output ([ParentObject] varchar
    (MAX
    ), [Object] varchar
    (MAX
    ), [Field] varchar
    (MAX
    ), [VALUE] varchar
    (MAX
    INSERT
    #DBCC_PAGE_Output ([ParentObject], [Object], [Field], [VALUE]) EXECUTE
    procDBCC_PAGE @db_name, @filenum, @pagenum
    SET
    @parent_object = (SELECT
    TOP
    1 [ParentObject] FROM
    #DBCC_PAGE_Output WHERE
    [Field] = 'FileLedgerID'
    AND
    [VALUE] = @FileLedgerID)
    --CreateLSN field Only
    SET
    @LogSequenceNumber = (SELECT
    [VALUE] FROM
    #DBCC_PAGE_Output WHERE
    [ParentObject] = @parent_object AND
    [Field] = 'CreateLSN'
    DROP
    TABLE
    #AllocationMetadata
    DROP
    TABLE
    #DBCC_PAGE_Output
    SET
    NOCOUNT
    OFF
    GO
    You'll need to add the following Stored Procedure to your 'master' database. Don't forgo the
    sys.sp_MS_marksystemobject step, as it won't work without it.
    CREATE
    PROCEDURE
    [dbo].[sp_AllocationMetadata_FileNum_PageNum]
    @object VARCHAR
    (128) = NULL
    AS
    SELECT
    CONVERT
    (VARCHAR
    (6),
    CONVERT
    (INT
    , SUBSTRING
    (sa.first_page, 6, 1) +
    SUBSTRING
    (sa.first_page, 5, 1))) AS
    [filenum],
    CONVERT
    (VARCHAR
    (20),
    CONVERT
    (INT
    , SUBSTRING
    (sa.first_page, 4, 1) +
    SUBSTRING
    (sa.first_page, 3, 1) +
    SUBSTRING
    (sa.first_page, 2, 1) +
    SUBSTRING
    (sa.first_page, 1, 1))) AS
    [pagenum]
    -- sp.object_id AS [Object_ID],
    -- OBJECT_NAME (sp.object_id) AS [Object Name],
    -- sp.index_id AS [Index ID],
    -- sa.allocation_unit_id AS [Alloc Unit ID],
    -- sa.type_desc AS [AllocUnitType],
    -- '(' + CONVERT (VARCHAR (6),
    -- CONVERT (INT, SUBSTRING (sa.first_page, 6, 1) +
    -- SUBSTRING (sa.first_page, 5, 1))) +
    -- ':' + CONVERT (VARCHAR (20),
    -- CONVERT (INT, SUBSTRING (sa.first_page, 4, 1) +
    -- SUBSTRING (sa.first_page, 3, 1) +
    -- SUBSTRING (sa.first_page, 2, 1) +
    -- SUBSTRING (sa.first_page, 1, 1))) +
    -- ')' AS [First Page],
    --sa.total_pages AS [Total Pages],
    -- '(' + CONVERT (VARCHAR (6),
    -- CONVERT (INT,
    -- SUBSTRING (sa.root_page, 6, 1) +
    -- SUBSTRING (sa.root_page, 5, 1))) +
    -- ':' + CONVERT (VARCHAR (20),
    -- CONVERT (INT,
    -- SUBSTRING (sa.root_page, 4, 1) +
    -- SUBSTRING (sa.root_page, 3, 1) +
    -- SUBSTRING (sa.root_page, 2, 1) +
    -- SUBSTRING (sa.root_page, 1, 1))) +
    -- ')' AS [Root Page],
    -- '(' + CONVERT (VARCHAR (6),
    -- CONVERT (INT,
    -- SUBSTRING (sa.first_iam_page, 6, 1) +
    -- SUBSTRING (sa.first_iam_page, 5, 1))) +
    -- ':' + CONVERT (VARCHAR (20),
    -- CONVERT (INT,
    -- SUBSTRING (sa.first_iam_page, 4, 1) +
    -- SUBSTRING (sa.first_iam_page, 3, 1) +
    -- SUBSTRING (sa.first_iam_page, 2, 1) +
    -- SUBSTRING (sa.first_iam_page, 1, 1))) +
    -- ')' AS [First IAM Page]
    FROM
    sys.system_internals_allocation_units AS
    sa,
    sys.partitions AS
    sp
    WHERE
    sa.container_id = sp.partition_id
    AND
    sp.object_id =
    (CASE
    WHEN
    (@object IS
    NULL
    THEN
    sp.object_id
    ELSE
    OBJECT_ID
    (@object)
    END
    AND
    sa.type_desc = 'IN_ROW_DATA'
    GO
    EXEC
    sys.sp_MS_marksystemobject sp_AllocationMetadata_FileNum_PageNum;
    GO
    And here's what I use in VBA to access the LogSequenceNumber.  FileLedgerID is the ID column of the data only table that stores the original filename, etc. This is also stored in the FILESTREAM table as a foreign key.
    Public
    Function
    Test_procFindLogSequenceNumber(lngFileLedgerID as Long)
    On
    Error
    GoTo
    ErrorHandler
    Dim
    cmd As
    New
    ADODB.Command
    Set
    cnn_Public_FILESTREAM = Nothing
    If
    cnn_Public_FILESTREAM Is
    Nothing
    Then
    Call
    funOpenOrRefreshADOSQLConnection_FILESTREAM
    cmd.ActiveConnection = cnn_Public_FILESTREAM 'This is my ADO connection to the FILESTREAM database, you'll have to do your own.
    cmd.CommandText = "procFindLogSequenceNumber"
    cmd.CommandType = adCmdStoredProc
    cmd.Parameters.Append cmd.CreateParameter("@TableName"
    , adLongVarChar, adParamInput, 500, "tblFileLedger_FILESTREAM"
    cmd.Parameters.Append cmd.CreateParameter("@FileLedgerID"
    , adInteger, adParamInput, , lngFileLedgerID)
    cmd.Parameters.Append cmd.CreateParameter("@LogSequenceNumber"
    , adVarWChar, adParamOutput, 500)
    cmd.Execute , , adExecuteNoRecords
    Debug.Print cmd.Parameters("@LogSequenceNumber"
    ExitProcedure:
    Set
    cmd = Nothing
    Exit
    Function
    ErrorHandler:
    MsgBox Err.Description
    Resume
    ExitProcedure
    End
    Function
    And here's what I use to convert the LSN into the exact File name.
    Private
    Function
    funFileNameFromFile_LSN(strBLOB_File_LSN_fun As
    String
    ) As
    String
    On
    Error
    GoTo
    ErrorHandler
    Dim
    intPositionOfFirstSpace
    'eg. 00000068:000008b0:0003 (104:2224:3)
    'Replace colons with dashes
    strBLOB_File_LSN_fun = Replace(strBLOB_File_LSN_fun, ":"
    'Get position of first space character
    intPositionOfFirstSpace = InStr(strBLOB_File_LSN_fun, " "
    'Contract string to characters before the first space
    funFileNameFromFile_LSN = Left(strBLOB_File_LSN_fun, intPositionOfFirstSpace - 1)
    ExitProcedure:
    Exit
    Function
    ErrorHandler:
    MsgBox Err.Description
    Resume
    ExitProcedure
    End
    Function
    I'm very grateful for the advice given here, but I think there still might be a legitimate reason to store the new file name that is created by SQL Server 2008. For instance, your MDF file might become corrupted beyond repair AND you have no backup. Stranger
    things have happened. In this case, you would still have your important files available on the server (named like 00000068-000008b0-0003) but you'd be unable to salvage them. You could use trial and error, I suppose (ie. Try adding .doc to the file names and
    see what works), but this would be unworkable as soon as you've got files in their hundreds.
    Maybe this is just paranoia. Nevertheless I hope this can be of assistance to others.
    Thanks again Kevin and Jacob.

  • PL SQL File  Download - file name shows up as procedure name?

    Hello,
    I have been following the article below to create a download link to my db blobs, however when downloading the files, the file name appears as the procedure name as opposed to the desired file name.
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/up_dn_files.htm#CIHDDJGF
    any ideas why this is happening?
    Thanks,
    J

    I've been having this exact problem all morning and I haven't found a workaround yet. The example posted by ptjurley doesn't quite clarify it for me. I am trying to play a video located in a table using an embedded windows media player. I'm working off these instructions: http://iadvise.blogspot.com/2007/10/apex-implementing-video-on-your-apex.html
    This is the code for the otherwise blank HTML region on the page:
    <object id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
    <param name="filename" value="#OWNER#.download_video_file?p_file_id=935">
    <param name="Showcontrols" value="True">
    <param name="autoStart" value="True">
    <embed type="application/x-mplayer2" src="#OWNER#.download_video_file?p_file_id=935" name="MediaPlayer" width=720 height=540></embed>
    </object>
    Even when the filename and embed source is left blank like this: <param name="filename" value=""> I get the same error when trying to load the page. How exactly was this problem fixed, if it was resolved? I assume it's something to do with APEX not recognizing that #OWNER# is a variable within the HTML region, but I could be wrong.
    Also, the code for my procedure differs from the example given in the above link, since APEX didn't like the way it was written. This is the download_video_file procedure I am trying to run:
    create or replace PROCEDURE download_video_file(p_file_id IN HOMEPAGE_PHOTOS.id%TYPE) as
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT blob_content, mime_type, dbms_lob.getlength(blob_content) file_length, name
    INTO Lob_loc,v_mime,v_length,v_file_name
    FROM HOMEPAGE_PHOTOS
    WHERE id = p_file_id;
    owa_util.mime_header(v_mime, FALSE);
    htp.p('Content-length: '||v_length);
    htp.p('Content-Disposition: attachment;
    filename="'||replace(replace(substr(v_file_name,instr(v_file_name, '/')+1),chr(10),null),chr(13),null)||'"');
    owa_util.http_header_close;
    wpg_docload.download_file(Lob_loc);
    end download_video_file;
    Edited by: user11293104 on Jun 22, 2009 12:41 PM

Maybe you are looking for

  • Comment écrire en colonne dans un Write to spreadsheet

    Bonjour, J'ai plusieurs  données à récupérer, mais mon problème n'est pas dans l'écriture du fichier mais plutôt les écrire en colonne dans le fichier. J'ai deux  boucles imbriquées, une qui va prendre les données et les écrire dans un fichier , et l

  • Cannot print to HP printer after upgrading PS CC to PS CC 2014

    Since upgrading Photoshop CC to Photoshop CC 2014 I cannot print from PS. All other apps on PC are fine. Printer drivers re-installed for good measure no joy. I have screen shot of random characters displayed on printer driver screen. Any thoughts?

  • Creating Relationships between views, causes writable mapping error

    Hi I'm using the DBAdapter in ESB (10.1.3.3), which uses Toplink and I am trying to create a relationship between a table and a view. None of the objects have any keys or indexes, so I am creating a relationship directly. When I have created the adap

  • Determining column throwing error

    Hi all, Given the following script : create table my_test ( d1 date, d2 date alter session set nls_date_format='DD/MM/YYYY'; insert into my_test(d1,d2) values('01/01/2008','01/0/2009'); OUTPUT : create table succeeded. alter session set succeeded. Er

  • How to reset password on airport extreme

    I forgot the password I created and I can not update the firware at this time