Rename, upload, and check-in

I am trying to find the correct sequence of code (using the IfsFileSystem API) which will check-out a versioned file, upload a renamed file, and check-it in resulting in the following versions:
Version 1. Original Filename.doc
Version 2. Renamed Filename.doc
The following code used to work in IFS 1.083.
IfsFileSystem.rename()
IfsFileSystem.checkOut()
IfsFileSystem.putDocument()
IfsFileSystem.checkIn()
However, this same code used against IFS 1.1 now results in the following versions:
Version 1. Renamed Filename.doc
Version 2. Renamed Filename.doc
I've tried re-ordering this sequence of code, but I receive a IFS-68005 error when attempting a putDocument before renaming the file.
Can anyone help?
Thanks
Steve Probst
null

I think I've answered my own question. The following seems to work in IFS 1.1:
IfsFileSystem.checkOut()
/* use the OLD (Original Filename.doc
)filename here */
IfsFileSystem.putDocument()
/* rename to Renamed Filename.doc */
IfsFileSystem.rename()
IfsFileSystem.checkIn()
This will result in the desired:
Version 1. Original Filename.doc
Version 2. Renamed Filename.doc
null

Similar Messages

  • How to upload and checkin  oracle objects(tables,functons etc)

    we are using scm repository and uploading and chicking in
    oracle forms and reports . want to know the steps to upload and check in oracle database objects like tables,functions,procedures etc which we already have in our database.
    plz help us .

    Rashid,
    for all structured objects you need Oracle Designer as frontend to SCM Repository. In Designer use the design editor und choose from the GENERATE Menu the item CAPTURE DESIGN OF. There you will find SERVER MODEL.
    regards
    Rainer

  • TS3899 I can  no longer send photos in an email from my iphone 5. It uploads the photo to the "new message" page - and then it freezes. I can use safari and check my emails, and when the email part is frozen the rest of the phone works fine ! any advice?!

    I can no longer send photos in an email from my iphone 5. It uploads the photo the the "mew message" page and then it freezes! I can use safari and check my emails, and when the email part is frozen I can still use the rest of my phone. Any advice ?!?

    Hi, ireland a. 
    I would recommend closing any open applications in multitasking and restarting the device.  If unfamiliar with multitasking, I have included a screenshot on how to process an application close. 
    iOS: Force an app to close
    Once these steps are processed, attempt to send the photo again. 
    iPhoto for iOS (iPhone): Send photos by email
    http://support.apple.com/kb/PH3271
    Regards,
    Jason H. 

  • TS3989 the uploading and downloading of photos in photostream is not working, it used to work. have gone through all the setups. checked that everything is on. using windows7 pc. any ideas ??

    photostram has stopped working between iphone and pc, uploading and downloading. I have gone through all the setups, made sure everthing is on but still no luck. Any ideas??

    Frank-
    Thanks for the suggestion -- I hadn't tried that but just did and it still doesn't seem to work. Would the binding cache AttrDefs separately from results?

  • Problem when trying to rename uploaded images using session value

    Hi,
    I have a form where 9 images are uploaded made into thumb nail size and then stored in a file. What I´m trying to do is rename those thumbnails from their original name to username_0, username_1, username_2 etc for each of the 9 thumbs. The username comes from the registration form on the same page. I have created a session variable for the username and am trying to use that to change to name of the image name, whilst my images are uploading and resizing the name stays as the original and not as the new username_$number. I have pasted relevant code below and would very much appreciate any help with this:
    <?php session_start();
    // check that form has been submitted and that name is not empty and has no errors
    if ($_POST && !empty($_POST['directusername'])) {
    // set session variable
    $_SESSION['directusername'] = $_POST['directusername'];
    // define a constant for the maximum upload size
    define ('MAX_FILE_SIZE', 5120000); 
    if (array_key_exists('upload', $_POST)) {
    // define constant for upload folder
    define('UPLOAD_DIR', 'J:/xampp/htdocs/propertypages/uploads/');
    // convert the maximum size to KB
    $max = number_format(MAX_FILE_SIZE/1024, 1).'KB';
    // create an array of permitted MIME types
    $permitted = array('image/gif','image/jpeg','image/pjpeg','image/png');
    foreach ($_FILES['photo']['name'] as $number => $file) {
    // replace any spaces in the filename with underscores
    $file = str_replace(' ', '_', $file);
    // begin by assuming the file is unacceptable
    $sizeOK = false;
    $typeOK = false;
    // check that file is within the permitted size
    if ($_FILES['photo']['size'] [$number] > 0 && $_FILES['photo']['size'] [$number] <= MAX_FILE_SIZE) {
    $sizeOK = true;
    // check that file is of a permitted MIME type
    foreach ($permitted as $type) {
    if ($type == $_FILES['photo']['type'] [$number]) {
    $typeOK = true;
    break;
    if ($sizeOK && $typeOK) {
    switch($_FILES['photo']['error'] [$number]) {
    case 0:
    include('Includes/create_thumbs.inc.php');
    break;
    case 3:
    $result[] = "Error uploading $file. Please try again.";
    default:
    $result[] = "System error uploading $file. Please contact us for further assistance.";
    elseif ($_FILES['photo']['error'] [$number] == 4) {
    $result[] = 'No file selected';
    else {
    $result[] = "$file cannot be uploaded. Maximum size: $max. Acceptable file types: gif, jpg, png.";
    ................CODE BELOW IS THE INCLUDES FILE THAT MAKES AND TRIES TO RENAME THE THUMBS................................................
    <?php
    // define constants
    define('THUMBS_DIR', 'J:/xampp/htdocs/propertypages/uploads/thumbs/');
    define('MAX_WIDTH_THB', 75);
    define('MAX_HEIGHT_THB', 75);
    set_time_limit(600);
    // process the uploaded image
    if (is_uploaded_file($_FILES['photo']['tmp_name'][$number] )) {
    $original = $_FILES['photo']['tmp_name'][$number] ;
    // begin by getting the details of the original
    list($width, $height, $type) = getimagesize($original);
    // check that original image is big enough
    if ($width < 270 || $height < 270) {
    $result[] = 'Image dimensions are too small, a minimum image of 270 by 270 is required';
    else { // crop image to a square before resizing to thumb
    if ($width > $height) {
    $x = ceil(($width - $height) / 2);
    $width = $height;
    $y = 0;
    else if($height > $width) {
    $y = ceil(($height - $width) / 2);
    $height = $width;
    $x = 0;
    // calculate the scaling ratio
    if ($width <= MAX_WIDTH_THB && $height <= MAX_HEIGHT_THB) {
    $ratio = 1;
    elseif ($width > $height) {
    $ratio = MAX_WIDTH_THB/$width;
    else {
    $ratio = MAX_HEIGHT_THB/$height;
    if (isset($_SESSION['directusername'])) {
    $username = $_SESSION['directusername'];
    // strip the extension off the image filename
    $imagetypes = array('/\.gif$/', '/\.jpg$/', '/\.jpeg$/', '/\.png$/');
    $name = preg_replace($imagetypes, '', basename($_FILES['photo']['name'][$number]));
    // change the images names to the user name _ the photo number
    $newname = str_replace ('name', '$username_$number', $name);
    // create an image resource for the original
    switch($type) {
    case 1:
    $source = @ imagecreatefromgif($original);
    if (!$source) {
    $result = 'Cannot process GIF files. Please use JPEG or PNG.';
    break;
    case 2:
    $source = imagecreatefromjpeg($original);
    break;
    case 3:
    $source = imagecreatefrompng($original);
    break;
    default:
    $source = NULL;
    $result = 'Cannot identify file type.';
    // make sure the image resource is OK
    if (!$source) {
    $result = 'Problem uploading image, please try again or contact us for further assistance';
    else {
    // calculate the dimensions of the thumbnail
    $thumb_width = round($width * $ratio);
    $thumb_height = round($height * $ratio);
    // create an image resource for the thumbnail
    $thumb = imagecreatetruecolor($thumb_width, $thumb_height);
    // create the resized copy
    imagecopyresampled($thumb, $source, 0, 0, $x, $y, $thumb_width, $thumb_height, $width, $height);
    // save the resized copy
    switch($type) {
    case 1:
    if (function_exists('imagegif'))  {
    $success[] = imagegif($thumb, THUMBS_DIR.$newname.'.gif');
    $photoname = $newname.'.gif';
    else {
    $success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg',50);
    $photoname = $newname.'.jpg';
    break;
    case 2:
    $success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg', 100);
    $photoname = $newname.'.jpg';
    break;
    case 3:
    $success[] = imagepng($thumb, THUMBS_DIR.$newname.'.png');
    $photoname = $newname.'.png';
    if ($success) {
    $result[] = "Upload sucessful";
    else {
    $result[] = 'Problem uploading image, please try again or contact us for further assistance';
    // remove the image resources from memory
    imagedestroy($source);
    imagedestroy($thumb);
    ?>
    I hope i´ve supplied enough information and look forward to receiving any help or advise in this matter.

    Use double quotes here:
    $newname = str_replace ('name', '$username_$number', $name);
    Change it to this:
    $newname = str_replace ('name', "$username_$number", $name);

  • How do I alter the html in the simple form contact us so it will upload and function on Bluhost?

    All representatives are actively assisting other customers. Your estimated wait time is 7 minute(s) and 0 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 6 minute(s) and 30 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 6 minute(s) and 30 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 7 minute(s) and 0 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 6 minute(s) and 30 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 6 minute(s) and 30 second(s) or longer. Thank you for your patience.
    All representatives are actively assisting other customers. Your estimated wait time is 6 minute(s) and 0 second(s) or longer. Thank you for your patience.
    You are now chatting with 'Parikshit'
    Parikshit: Hello K.
    Parikshit: I read your issue description.
    Parikshit: The form doesn't upload there. Does the form work fine when you test it on your computer by previewing in browser from Muse?
    k: hello I am examining my page in developer ( source) in safari and I can see lines of tesst that say the server encountered and error.
    k: If I export to my desktop, I can see the form but it does not work. If I upload it does not appear at all, and that is in not what adobe says the form will do. Adobe says the form will APPEAR but not function. It does not appear OR function. I had tried the 3 versions of php.... now I need to see a working form to a usual, commercial host so that I can copy the relevant code.
    k: lines of text
    k: And no, it does not work when I preview in browser
    k: When I preview to browser it does turn red for a while.... but it doesn't do anything.
    Parikshit: Can you publish the site in BC one to check if it works, if it doesn't then there must be some issue with the form itself. It's code.
    k: no. I do not have a subscription and my client does not want BC used at all. I have the new CC muse which is supposed to finally work without having to upload to BC.
    k: I have several cloud subscriptions, when cloud ever starts to work....
    Parikshit: You don't need to work in BC or have it as your host. This is just to test if it works.
    Parikshit: Just a trial site.
    k: but my client refuses to have anythig to do with BC, and I don't blame them. They had bad experiences inthe past and do not want to do anything that involves BC.
    Parikshit: You won't have to pay for the site.
    k: I don't want to involve BC because I promised my client I would not go there. They were very insistant. We were finally going to use Muse because you no longer are required to use BC. BC was the big sticking point. But if I can't do this without using BC, then I am right back to where I was year ago. No better.
    k: I think I have a limited number of occasions when i can use BC, and I don't want to do it now for this simple contact form. What a cheat.
    k: What other functions in Adobe Muse CC won't work unless they are euphemistically " tested" on BC? Save me the time and dissappointment tryig to use this software.
    k: Adobe states that the form will appear when uploaded to a outside site, but not work. The form does not upload, and the form does not appear. I tried version 5.2,5.3, 5.4 and then put php back to version 5.3.
    Parikshit: There is nothing wrong with it. Did you change the code of the form?
    k: no. And there is plenty wrong with it, it does not appear. I did not change the code because I want to look at a sample that has been altered to make sure I alter it the correct way. Where can I find the page source of a page that has the simple contact form widget used and uploaded to a commercial hosting site, and the forem works.
    k: form works
    k: This was a bug that was described last year and the release of this version advertised it had been corrected. It is not corrected.
    Parikshit: It is corrected and several users are able to use it fine.
    k: Then send me a page from one of the ones that is working fine.
    k: who are those several users? Give me names.
    Parikshit: there is either something wrong on the host's end that this doesn't get uploaded. We've already had many users upload it to an external hosts. We don't keep user site URLs with us, and hence I won't be able to provide you with one. But the best method here would be to post this on our forums, and then all our forum members (including users who have successfully implemented this) will be able to see the post and reply to it.
    k: I've seen them all complaining that this still doesn't work. Perhaps you should encourage some of the successful uploaders to post to the forum. Send me a link. I had numerous tech support people at the host check this and there was nothing wrong with their PHP or the upload path.
    Sorry, our chat session has ended due to circumstances beyond our control. Please feel free to contact us again if you need further assistance.

    Can you supply a link?

  • How to upload and Download the file in a system through java programing

    I am trying to upload a file as well as want to download the uploaded file in my system....I don't have any server an all.
    I want to implement this in my system only .
    I got this code but i don't know ,where i have to make the change and what are the parameters i have to pass.
    can any one help me on this code ....please
    here some piece of code
    File Upload and Download Code Example
    package com.resource.util;
    public class FileUpload
    public void upload( String ftpServer, String user, String password,
    String fileName, File source ) throws MalformedURLException,
    IOException
    if (ftpServer != null && fileName != null && source != null)
    StringBuffer sb = new StringBuffer( "ftp://" );
    // check for authentication else assume its anonymous access.
    if (user != null && password != null)
    sb.append( user );
    sb.append( ':' );
    sb.append( password );
    sb.append( '@' );
    sb.append( ftpServer );
    sb.append( '/' );
    sb.append( fileName );
    * type ==> a=ASCII mode, i=image (binary) mode, d= file directory
    * listing
    sb.append( ";type=i" );
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    try
    URL url = new URL( sb.toString() );
    URLConnection urlc = url.openConnection();
    bos = new BufferedOutputStream( urlc.getOutputStream() );
    bis = new BufferedInputStream( new FileInputStream( source ) );
    int i;
    // read byte by byte until end of stream
    while ((i = bis.read()) != -1)
    bos.write( i );
    finally
    if (bis != null)
    try
    bis.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    if (bos != null)
    try
    bos.close();
    catch (IOException ioe)
    ioe.printStackTrace();
    else
    System.out.println( "Input not available." );
    }

    At least that is what the code you posted suggests to me.It looks like that to me too.
    I believe that
    URLConnection urlc = url.openConnection(url);Will return you an FTP URLConnection implementation if you pass it a ftp:// url
    So for simple FTP ops, you don't need any external libs.
    Actually, looking at your code, this is already what you are doing, so I really don't get this:
    am not using FTP server..... i want to implement in my system only ....So How i will do.
    Can you give me any idea based on this code Can you explain a bit more what you need?
    patumaire

  • File upload and download in server through web Dynpro

    Hai all,
             i want to store one document in SQL Server 2000 through Webdyn pro. I inserted
    one document through java into SQL Server 2000 using the following method which name is
    insertFile(...).
    void insertFile(FileDBTransfer fdb, Connection cn, String FileName)throws IOException, FileNotFoundException, SQLException
              int FileLength;
              FileInputStream fis;
              PreparedStatement pstmt;
              int last=FileName.lastIndexOf("/");
              String docname=FileName.substring(last+1,FileName.length());
              fis = fdb.getFileInputStream(FileName);
              FileLength= fdb.getFileLength(FileName);
              pstmt = cn.prepareStatement("insert into ReportArchive values(?,?)");
              pstmt.setString(1,docname);
              pstmt.setBinaryStream(2, fis, FileLength); //method to insert a stream of bytes
              pstmt.executeUpdate();
         }// end insertZipFile
         Here i have given file name like "c:\test\test.pdf" it's work fine.
         My J2EE server is running different machine and my Netweaver is another machine.
    If both server and IDE in same machine it's work fine. But both are in different machine,
    i have some problems.
         If i try like this server always go and check his own path, not client machine
    so it will error like "given source not found". So if i get client machine's path
    then i will store easily into SQL Server 2000.
         Whenever i run, it should check the client machine path instead of server path. 
    Thanks in advance,
    K.Saravanan.

    Hi Saravan,
    Data
    Determines the data drain, that is, the location of the data, of the file to be uploaded in the context. The system can only read this data value.
    fileName
    Gives exact filename
    Refer IWDFileUpload also
    http://help.sap.com/saphelp_nw04/helpdata/en/5a/90ff4cd0c8cd48a69b836e5e550880/content.htm
                          Regards
                            Kisgor Gopinathan
    Message was edited by: Kishor Gopinathan
    Message was edited by: Kishor Gopinathan

  • Remove and check cartridge on right error message on 7410 all in one

    I recently changed the black ink cartridge in my 7410 all in one printer. After changing cartridge it gave me an error message of " Remove and check cartridge on right". I have tried removing and reinstalling , cleaning connection points with clean damp cloth (water) and still cannot get error message to go away.
    Any ideas would be greatly appreciated. Thank You.

    NoProblemAtoll wrote:
    I know this is an older thread but being it is a top Google result associated with the "Remove and check cartridge on right" error it justifies adding a helpful suggestion for other.  Our findings have been HP Printers are very biased against refilled \ recycled cartridges.  I own a total of (5)x HP 7310 and HP 7410 printers in my IT Consulting office.  These are feature rich MFP’s with an abundant supply of ink available at generously economical prices.  On the face of it, it sounds like a good reason to keep a bevy of last gen printers around. EXCEPT the printers work great with the $30-$50 brand new HP brand 96 cartridges from Office Depot or Staples.  Unfortunately if you try and buy some recycled cartridges off ebay the Printers detect the recycled\refilled cartridges as a previously depleted HP cartridge that may not be genuine and the units suddenly turn on you.  Miraculously the "Remove and check cartridge on right" only manifests itself with non-HP brand cartridges or cartridges that have been refilled.  (We have even tried to re-fill out own refreshly depleted cartridges with like results.)  Think of it as an HP service reminder conveying you forgot to pay HP their $30-$50 profit on your ink this go round.  Remember you need HP Branded ink cartridges (HP = Homogeneously Proprietary).  It’s like an intention flaw written into the firmware.  Best guess (purely on conjecture) is there is a check in the firmware/drivers for if the cartridges has been previously installed, previously depleted, max install count, and expiration date validation.  If it encounters a condition it doesn’t like you get this nondescript error.
    [advertisement snipped]
    The above post is filled with conjecture and speculation, but is not based on fact.  The Officejet7410 is not programmed to reject refilled/reman cartridges.  It will check cartridges electrically for various things and will reject cartridges that fail.  Typical failures would include a cracked printhead (caused by rough treatment - dropping the cartridge even a few inches for example), or open electrical connections caused by   debris on the cartridge contacts.  Cleaning the cartridge contacts as shown in the document here may resolve the issue in case of poor electrical contacts.
    A cartridge that has been previously used in a different printer will likely be marked as empty, but the printer will happily print with a cartridge detected as empty.
    The reality is that the quality of refill and reman cartridges are very variable, but generally poor.  The study here has a study conducted by a testing facility, here is another study. 
    My personal experience has been similar.  I donated an HP all-in-one to my son's high school years ago.  Sometime later I got a call from the teacher complaining that it was not printing properly.  I went and took a look and found they had put in a renam color cartridge that was not printing one of the colors*. They tried another cartridge, which also had a problem and then finally the third cartridge worked.  I asked why they used renam cartridges and he said they bought these because they were cheaper.  I asked if they were 1/3 the cost....
    *The color missing had nothing to do with the printer - blotting the bad cartridge on a damp tissue gave only two of the three colors that would normally be present.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • What's the difference between FM 'UPLOAD' and FM 'ALSM_EXCEL_TO_INTERNAL_T'

    What's the difference between FM 'UPLOAD' and FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    thanks!

    hi,
    Generally FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'  is used for reading Excel sheet i.e, either row wise or column wise . where as WS_UPLOAD will read the entire data in to an internal table in a file format.
    for illustration as how it is used check this out
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = p_infile
                i_begin_col             = '1'
                i_begin_row             = '2'  "Do not require headings
                i_end_col               = '14'
                i_end_row               = '31'
           tables
                intern                  = itab
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading Excel Spreadsheet
      endif.
    http://www.sapdevelopment.co.uk/file/file_upexcelalt2.htm
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = gd_file
          has_field_separator     = 'X'  "file is TAB delimited
        TABLES
          data_tab                = it_record
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
        IF sy-subrc NE 0.
          write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
          skip.
        endif.
    http://www.sapdevelopment.co.uk/file/file_uptabpc.htm
    Regards,
    Santosh

  • New iPad wont upload some checked songs from itunes

    New iPad will not upload all checked songs in iTunes from my PC and there is plenty of space.

    Solved- Some music doesnt show up under Artist view but music is there under song view.

  • How to have concurrent CSV upload and manual edit in APEX on the same table

    Hi there,
    my users want to have csv upload and manual edit on apex pages functions together...
    it means they want to insert the data by csv upload and also have interactive report and form on the same table...
    so if user A changes something in csv file...then user B update or delete another record from apex fronted (manually in the apex form)...then after that user A wants to upload the csv file,the record was changed by user B would be overwritten ...
    So how can I prevent it?????

    Hi Huzaifa,
    Thanks for the reply...
    I'm going to use File Browser so that end users can upload the files themselves...
    after editing data by users...a manger going to review it and in case of approval , i need to insert the data to one final table....
    so it needs much effort to check two source tables and in case of difference between table of csv and other one...what to do...

  • How to  upload and display image using bsp application

    hi
    I  just wants to know that
    1- how to  upload image from BSP page with attachment into sap server .?
    2-how to display image in to BSP page(webpage).
    thanks

    Hello Gupta Prashant,
    Just to upload and display an image, import image in MIME repository. Not only still images but also flash files can also be uploaded in the MIME repository. Once you import the image in it, use normal html code for image call;
    <img src = "file.jpg/gif" width=  height=>
    Besides it, if your requirement is to store the image in the database and fetch it based on specified field-name, then you have to go for BLOBs i.e Binary Large Object, using this you can also store images, videos, pdfs, applications in the database.
    MBLOB - Medium BLOBs store videos and pdfs,
    LBLOB  - Large BLOBs store movie files and applications.
    You have got 2 ways to use it; some databases store BLOB objects into themselves and some store the path of the BLOB object maintained on the FTP server.
    You can also implement it in ABAP;
    read the following link and practice the tutorial;
    [ Use of MIME Types|http://help.sap.com/saphelp_45b/helpdata/en/f1/b4a6c4df3911d18e080000e8a48612/content.htm]
    also check this
    [TYPES - LOB HANDLE|http://help.sap.com/abapdocu/en/ABAPTYPES_LOB_HANDLE.htm]
    And looking at your question, in order to upload an image, you can make use of FILEUPLOAD tag provided by HTMLB.
    Step 1: FILEUPLOAD provides a browse button to choose desired image file.
    Step 2: Store that image in database using BLOBs.
    Step 3: Retrieve the image using normal select query and display it on the screen.
    Hope it helps you,
    Zahack

  • To upload and download

    i hv 2 buttons one for upload and another for download
    through webutil
    i hv written this code but it is not inserting record into the table, thr r no records in the table, it is empty, when i try to upload .txt file it is showing me an error "missing expression" ORA-00936
    the code is
    declare
    sMY_file varchar2(200);
    v_Last_Directory      Varchar2(2000);
    v_Upload_Succes     boolean;
    nWHERE          number(10);
    OUT_DOC_ID number;
    temp_id number;
    doc_id_temp number;
    v_status VARCHAR2(200);
    BEGIN
    OUT_DOC_ID:=:parameter.p_dealid; --:files.deal_id;
         sMY_file := WebUtil_File.File_save_Dialog(v_Last_Directory,
         'test',
         '|All Files|*.*|',
         'Select a file');
    if OUT_DOC_ID is not null then
    v_Upload_Succes := WebUtil_File_Transfer.Client_to_db(sMY_file,
    'deal_document_file', -- TABLE name
    'CONTENT' , -- columname
    'deal_id||='||OUT_DOC_ID ||' and document_file_name='||:files.document_file_name -- where          
    elsif OUT_DOC_ID is null then
         v_status := get_block_property('files',status);
    temp_id:=get_id;
    :files.deal_id:=temp_id;
    :files.document_file_name:= substr(sMY_file,instr(sMY_file,'\',-1)+1);
         insert into deal_document_file (deal_id,document_file_name) values
    (:files.deal_id, :files.document_file_name);
         commit;
         v_Upload_Succes := WebUtil_File_Transfer.Client_to_db(     sMY_file,
    'deal_document_file', -- TABLE name
         'CONTENT' , -- columname
         'deal_id='||:files.deal_id||' and document_file_name='||:files.document_file_name
    end if;     
    commit;
    if (v_Upload_Succes) then
         :files.maker:= sysuser;
         :files.made_at:=sysdate;
    end if;
    end;
    commit;
    could anybody help me in this.

    No, the form is not fine else you would not have this FRM error message.
    Check the syntax of the parameters given to the WebUtil_File_Transfer.Client_to_db() Webutil function. add a message() instruction just after to see if the function if well executed.
    Francois

  • How to upload and overwrite a file from a dynamic list

    I need to come up with a way to upload and overwrite and existing image file from a dynamically generated list. For instance, there would be a drop-down select box with Company A, Company B, Company C, etc. and when the user selects one of them it should display a prompt to upload a new logo image file, overwriting the existing logo file. Any help would be appreciated.

    I'm not sure why you need a prompt.  Sounds like an unnecessary annoyance to me.
    A simple form with a select and input type="file" should get you started.  Then I would probably do something like:
    1.  upload the file to a temp folder on your server.
    2.  Rename it according to what company was selected.
    3.  Move it to it's permanent folder.

Maybe you are looking for