How to display the uploaded file
Hi All ,
I have the below requirement .
1. Upload the file (any file type) -- no problem done with FileUpload UI element.
2. Display the uploaded file as icon or link .
3. User should be able to delete the uploaded file using icon or link (depends upon step2 ).
I am struggling with step2 and 3 .
Please guide me
Regards,
Ravi
Hi,
You can use the file download UI element for your requirment. You will have the Resource type context that is used to bind the File upload UI element. bind the same context to the file download UI element. And hence without any extra coding your requirment is achieved.
For deleting the Uploaded file delete the context element of type reource.
For your reference refer to the following link
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
Regards,
Raju Bonagiri
Similar Messages
-
How to Display the SAVE file name dialogue in Forms 6i
Dear All,
Just like we use Get_file_Name to display the MS Open file dialogue..
how do we display the SAVE file dialogue in forms..??
whats the function name???
regards,
Sidhanthello friend,
u can use webutill lib to open/save dialog box
also must refer this link,
Re: How To Call Save As Dialog?
Regards
Chandan -
How to list the uploaded files in jsp
hello every body .
I wanted to request to plese let me know the method as to how get the uploaded files on the server to a jsp page . i am able to upload the files but not able to get those files listed on the web page . please help me ...........i tried this also and it didn't wok instead my page got filled with these lines
The file named CSAJSP-Chapter12.pdf is successfully uploaded [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0
. I am not able to make out any thing . plese suggest me some solution -
How to display the attached file of DMS in WEB Dynpro
Hello everybody! I have to work with DMS documents on the portal. Do You know, how display the attached files of DMS document in WEB Dynpro?
Pavel TruhlářHi Pavel,
By using the below F.M we can display DMS Document.
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
PF_DOKAR = 'ZAP'
PF_DOKNR = LS_DMS_TABLE-DOKNR
PF_DOKVR = '00'
PF_DOKTL = '000'
PF_HOSTNAME = 'DEFAULT'
PF_APPL_START = ' '
PF_GET_URL = 'X'
IMPORTING
PFX_URL = V_URL
EXCEPTIONS
ERROR = 1
NOT_FOUND = 2
NO_AUTH = 3
NO_ORIGINAL = 4
OTHERS = 5.
After getting the V_URL Create External Window.
LO_API_COMPONENT = WD_THIS->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LO_WINDOW = LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW(
URL = LW_URL ).
BR,
Jack. -
How to display the HTML File Titles instead of File Names
Hello All,
I want to display the HTML file titles instead of File names in the Search Results. I've tried to give this command in the 'Visible Properties' in the 'SearchResourceRenderer' as:-
Visible Properties: rnd:displayTitle
However this is not working for me. If anyone has an idea of what to pass here or any other alternative to display the Titles.
Regards
VaibSummary of steps:
1) Standard Layout Set used: SearchResultLayoutSet
2) Create a new layout set using ADVANCED COPY
3) Change properties as you require
4) Next modify the search OTH file to reflect this newly created Layout Set (under KM > root > etc > oth > search.oth edit xml file property rndLaoutSet from SearchResultLayoutSet to MyCustomSearchResultLayoutSet)
5) Check in the document to complete the editing process if Edit Locally is used!
6) Lastly, activate the OTH file by
Setting Debugging settings via Debugging Settings
Performing a normal search
Clicking Rendering information and then following link OTH Overview click on Reload
7) Reload above reloads the OTH file and performing search again will yield the desired result
8) To turn off the Rendering Information link remove the user id from Debugging Settings.
Cheers
Ankit -
How to list the uploaded files on the server with a jsp page
hi every body , iam stuck up with yhis problem . I a have use Random Access File to upload files to the web server , now i want the user can see the files he /she has uploaded or the the files uploaded by others . plese help me how to implement this .
Message was edited by:
joshiashutoshhi every body , iam stuck up with yhis problem . I a
have use Random Access File to upload files to the
web server ,Huh?
now i want the user can see the files he
/she has uploaded or the the files uploaded by others
. plese help me how to implement this .So get the directory using the File class the files are in and list the files inside, showing the result to the user... how difficult would that be? -
How to restrict the upload file size in me21n/me22n/me23n?
Hi Guru's,
I have a requirement to restrict the user from attaching a local file more than 20MB in Purchase Order.
In standard SAP system, the user can attach a file of any size in PO. How to restrict the size of the file?
I have no clue how to achieve this? Any kind of help would be great...
Thanks in Advance...
Regards,
SatyamHi Guru's,
The file size is now restricted in function GUI_UPLOAD. But this function module is used at many places. I want to restrict it only for Tcode: ME22n and ME23n.
I thought of restricting it by sy-tcode field but sy-tcode value is not passed to this function module in the run time.
Could anyone help me on this how to restrict it for the above mentioned tcodes??
Regards,
Satyam -
How to get the upload file from a html form ?
I have a <input type=file ...> control in my form, and the user use that
control to submit a file
to my web server. The porblem is the getParameter() function of
HttpServletRequest only return the
filename. Does anyone know how to get the file body ?
Frances
http://www.servlets.com/jsp/examples/ch04/index.html#ex04_17
Frances Fan <[email protected]> wrote:
> I have a <input type=file ...> control in my form, and the user use that
> control to submit a file
> to my web server. The porblem is the getParameter() function of
> HttpServletRequest only return the
> filename. Does anyone know how to get the file body ?
> Frances
Dimitri
-
How to display the open file dialogue in SBO 2007
Hi
I have my own form on screen with a edit text box which will contain the path and name of a file entered by the user
Is there any way I can display the windows open file dialogue so the user can search for a file ?
Many thanks
Regards AndyHi Anoop
Code below, simple and it seems to work well
Thanks for your help
Regards Andy
fpath = ""
Dim thread As New System.Threading.Thread(AddressOf openfile)
thread.SetApartmentState(Threading.ApartmentState.STA)
thread.Start()
thread.Join()
form.Items.Item("4").Specific.string = fpath
Sub openfile()
Dim abform As Form1
abform = New Form1
abform.Show()
abform.OpenFileDialog1.Filter = "CSV Files|*.csv"
If abform.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
fpath = abform.OpenFileDialog1.FileName
End If
abform.Close()
End Sub -
How to display the rdf file column in XML Publisher
Hi
I have used the formula bar and returned the value to diaplay in xml output .so that i can use in template.But i could not find the value which i returned in rdf.
Can anybody suggest me do i need to change/modify in any other places to find my column/value in xml output.
Thanksno need to do any specific changes.
if you have a formulae column in RDF it will definitely show up in your xml output,
see if you are doing any silly mistake like,
RDF not saved peoperly,
.RDF is not replaced with the updated version or something like that -
To Delete the uploaded file in Application Server
Hi Friends,
I developed an BSP Application displaying the results from ITAB though Iterator, for which , each row there is feature to upload a particular file in the Application Server, where I stored the file path into a database table field. .When I delete the the row, I am successfully get rid of the entire row including the file path.
My Question.
1. How to delete the uploaded file of the Application Server ?
Please mail me in this regard.
Regards
CSM ReddyHi,
you have the keyword and you have the documentation. What is your problem?
Search in the forums with keyword "delete dataset", there are lots of threads about this.
Example
Deletion of dataset in applicaiton server
deleting file from AL11 Tcode
Best regards
Renald -
How to specify the directory in which we want to store the uploaded files
Hello !!
I am using apache commonfile upload for uploading my files.I followed the user guide and tried to run a program,but my problem is I am not able to understand as to how to mention the directory in which the uploaded file will be saved..My code is given below :
package r;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.servlet.*;
import org.apache.commons.fileupload.disk.*;
import org.apache.commons.io.*;
import java.lang.Exception;
public class fileupload extends HttpServlet
public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
System.out.println(isMultipart);
if (ServletFileUpload.isMultipartContent(request))
// Create a factory for disk-based file items
FileItemFactory factory = new DiskFileItemFactory();
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
try {
List items= upload.parseRequest(request);
Iterator iter = items.iterator();
while (iter.hasNext())
FileItem item = (FileItem) iter.next();
if (item.isFormField()) //NORMAL FORM FIELD
String name = item.getFieldName();
String value = item.getString();
System.out.println(value);
else
String fileName = item.getName();
System.out.println(fileName);
String contentType = item.getContentType();
File saveTo = new File("/info/upload_files/myFile.jpeg");
try
item.write(saveTo);
System.out.println("File written" );
catch(Exception e)
System.out.println("File not written");
// InputStream fs= item.getInputStream();
fileName = FilenameUtils.getName(fileName);
System.out.println(fileName);
}//end of try
catch (Exception e) { }
public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
doGet(request,response);
The problem is that the control doesn't reach the try statement and I get " File not written" on the console because it enters catch everytime..Please tell me how the path to the directory should be given...Rest of the code is working fineNo, the problem is that when an Exception is thrown, you ignore it completely and throw away all the information associated with it. That leaves you to guess at what the problem is. So instead of answering your guess at a good question, I'm going to suggest that in all of your catch blocks you put this code:e.printStackTrace();Then you can look at the output in the log file and see what the problem is. Start from there.
-
How to add new row and update existing rows at a time form the upload file
hi
How to add new row and update existing rows at a time form the upload file
example:ztable(existing table)
bcent smh nsmh valid date
0001112465 7.4 26.06.2007
0001112466 7.5 26.06.2007
000111801 7.6 26.06.2007
1982 7.8 26.06.2007
Flat file structure
bcent nsmh valid date
0001112465 7.8 26.06.2007 ( update into above table in nsmh)
0001112466 7.9 26.06.2007 ( update into above table in nsmh)
000111801 7.6 26.06.2007 ( update into above table in nsmh
1985 11 26.06.2007 new row it should insert in table
thanks,
Sivagopal RHi,
First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
Then :
Loop at it.
*insert or modify as per your requirement.
Endloop.
Regards,
Srilatha. -
How to display the data in XML files into JSP using Jdeveloper.
Hi All,
I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
Are there any reference documents, regarding the above process please can anyone guide through how to do it.Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.
-
How to load and display the external flv video files in dynamicly and the how to control the flv fil
How to load and display the external flv video files in dynamicly using AS 3.0
and How to control the flv file add the play paus button and add seekbar.
I have using to load the flv file following code
var flvPlaceHolder1:MovieClip = new MovieClip();
var vid1:Video = new Video(734, 408);
flvPlaceHolder1.addChild(vid1);
addChild(flvPlaceHolder1);
flvPlaceHolder1.x = 1059;
flvPlaceHolder1.y = 152;
var nc1:NetConnection = new NetConnection();
nc1.connect(null);
var ns1:NetStream = new NetStream(nc1);
vid1.attachNetStream(ns1);
var listener1:Object = new Object();
listener1.onMetaData = function(evt:Object):void {};
ns1.client = listener1;
ns1.play("GV-1600 TURNING.flv");
ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
function statusChanged1(ns1:NetStatusEvent):void
trace(ns1.info.code);
if (ns1.info.code == 'NetStream.Buffer.Empty')
trace('the video has ended');
removeChild(flvPlaceHolder1);
//trace('removeChild');
gotoAndPlay(1786);
then how to add the play,paus ,full screen button and seekbar,volumebar.I have to Create the flash presentation for our company product
In this presentation the left side the text animation are displayed then right side the our product video is displayed.
In this presentation i need the following option :
1, The first product video and animation is finished then the next product is played
2, then the video displayed (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
3, then the playing video i control it play, stop, paus button and volume bar, seek bar.
4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
I have finished first two steps 1 and 2
the following are the screen short and code:-
code :-
var count=0;
var flvPlaceHolder2:MovieClip = new MovieClip();
var vid2:Video = new Video(734, 408);
flvPlaceHolder2.addChild(vid2);
addChild(flvPlaceHolder2);
flvPlaceHolder2.x = 1059;
flvPlaceHolder2.y = 152;
var nc2:NetConnection = new NetConnection();
nc2.connect(null);
var ns2:NetStream = new NetStream(nc2);
vid2.attachNetStream(ns2);
var listener2:Object = new Object();
listener2.onMetaData = function(evt:Object):void {};
ns2.client = listener2;
ns2.play("GS-4000.flv");
this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
function BtnFadeIn2(event:Event):void
if (this.currentFrame == 387)
/*flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
trace('Screen size is changed');*/
if(count==0)
flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
count++;
ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
function statusChanged2(ns2:NetStatusEvent):void
trace(ns2.info.code);
if (ns2.info.code == 'NetStream.Buffer.Empty')
trace('the video has ended');
removeChild(flvPlaceHolder2);
//trace('removeChild');
gotoAndPlay(433);
flvPlaceHolder2.buttonMode=true;
flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
function home2(e:MouseEvent):void
if(vid2.width==734 && vid2.height==408)
flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
else
flvPlaceHolder2.x = 1059;
flvPlaceHolder2.y = 152;
vid2.width=734;
vid2.height=408;
Maybe you are looking for
-
SunFire X2200 and SAS JBOD J4200 - removal of hard disk issue
Hello, We just purchased one X200 M2 server and a J4200 JBOD storage attached to SAS HBA of the server. The J4200 array works and we can access all the disks properly, create ZFS pools - all works. We have a problem when we try to identify the correc
-
Live Preview Highlight is not working.
I recently downloaded Edge Code to a new work computer and the Live Preview Highlight is not working. I have Edge Code installed on a personal computer, and it works great. The version I am using was downloaded about 6 months ago so I am not sure if
-
Cost not picking from Inforecord
Dear All, As per our costing strategy, cost should be pick up from inforecord but strange part is that for one of the material the cost is not picking from inforrecord. The inforrecord is not marked for deletion, this material has only one valid inf
-
Have CS3 and CS4, removed CS3, now no ID files will open
I had both InDesign CS3 and CS4 installed. By default when I would open an ID file, it would always open in CS4. I forgot CS3 was on there so I uninstalled it and restarted the computer. Now nothing starts in Indesign at all unless i actually open
-
NiIviDmmComponent.h not found?
I'm finally getting closer on this conversion from a big Visual Studio C++ 6.0 project to Visual Studio .Net 2005. Now in my NIIncludes.h file, it is unable to find NiIviDmmComponent.h. I have freshly installed Ni-Dmm 2.9 and it shows in the last scr