How to modify KM upload to accept jpg/bmp files only?
Hi All,
I want to modify the KM upload command so that it accepts only ".jpg or ".bmp" file types. If any other file type is used then give an error message such as "Files of type jpg, bmp can only be uploaded". Also restrict the size to 1 or 2 MB only..
I have also checked out some threads posted in this forum in this regard...
I got 'UIUploadCommand.java' which is the class file of 'upload' (KM UICommand).
but, i am not gettign the reference getContentType of the resource so that i can have a condition to upload only jpg/bmp files ...
Awaiting your replies...
Plz help..
Regards,
SK.
Hi Srinath,
i just ended up doing the same..
Thanks for your reply...
I have a problem ...
I created a UI command called sk_upload with my class name...
i have created a UI command group called sk_group
i have added it in my Layoutset >> coll. renderer >> commands gruop >> sk_group.
but, i don't see the command as a menu !
Can u help me ?
Similar Messages
-
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script
Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number
Please provide the procedure and coding.
Thanks in advance
RajuHi,
The following link may be useful to u.
help.sap.com/printdocu/.../BCSRVOBS.pdf -
How to converting a flash clip into a bmp file quickly
Hi,
I’d like to get help on converting a flash clip into a
bmp file. I have an application developed with ActiveX technology.
There is a flash control embedded in the ActiveX control, which has
a printing button. The end users can press the printing button to
print the flash picture as well as other text content.
I get the flash picture for printing in follow steps:
1.Create a BitmapData object
var bmp:BitmapData = new BitmapData(w, h, false);
2.Obtain the image of current flash
bmp.draw(mc, mc.transform.matrix, new ColorTransform(), 1,
new Rectangle(x, y, w, h));
3.Get pixels of flash image one by one in loop, and save them
into a PixelCollection
bmp.getPixel(col, row);
4.Move the PixelCollection into flash container
fscommand("print", load_PixelCollection);
5.Ocx control gets the PixelCollection and converts it into
BMP format
But I find it is very slow when action script gets pixels one
by one. Getting pixels of a middle size flash may spend one minute.
It is hard for our customer to stand. Does anyone have idea to get
the flash image quickly?
Any help is appreciated.
Shi HangWhat about the built-in print methods, wouldn't it be better
to use those here?
Getting all pixel values is a time intensive process, because
of the amount of pixels. It may be a bit faster if you split the
getPixel() loop over some frames, but I'm not exactly sure how to
do that (just read it somewhere).
If the content is fixed, you could create the pixel array in
the background while the user looks at it. This is quite some
overhead, but when the user decides to print, the array would
already be there.
Finally, not helpful here, but interesting:
quote:
BitmapData.getPixels()
No longer do you have to loop through every pixel in a
bitmap, one at a time with getPixel to send a bitmap to the server.
This method returns a ByteArray containing the hexadecimal color
value of each of the pixels in the specified rectangular region of
a bitmap. Use this method in conjunction with the new ZLib
compression method; ByteArray.compress() to compress and send a
bitmap over the wire to a server so it can be converted into a file
ready for downloading.
(from
http://www.flashguru.co.uk/actionscript-3-new-capabilities/)
This will be available in AS 3.
hth,
blemmo -
How to save a CWGraph into a bitmap (.bmp) file in Visual C++?
I plot (chart) data into a graph control on a MFC dialog in Visual C++ and I need to save the image into a bmp file. I found the ControlImage method, but did not find any way to use it in Visual C++.
I would also like to retrieve the chart data (the point charted on the graph for each plot) and to use them to build data files. How to do it?Dealing with images in VC++ is far from easy. You would need to create the following objects: CBitmap, CArchive, CPictureHolder and a CDC.
Then call the SelectObject function on the CDC and pass in the CBitmap object. Then you can put the image of the graph in the CPictureHolder with:
ph.SetPictureDispatch((LPPICTUREDISP)m_CWGraph.ControlImage().m_lpDispatch);
where ph is the CPictureHolder and m_CWGraph is the CWGraph.
Then you can render the image to the bitmap CDC by calling the CPictureHolder::Render function. It will ask for the bounds of the picture in CRect form as well.
Then you can call the CBitmap.Serialize function with the CArchive object which should be pointing to the appropriate BMP file. Don't you just love MFC?
As for you second qu
estion, you can't retrieve the data that has been plotted to the graph. We don't maintain the data that is sent in because it would be very inefficient memory usage since data is usually decimated for display. I would recommend that you just send your data to a global buffer at the same time as plotting.
Best Regards,
Chris Matthews
Measurement Studio Support Manager -
How to MODIFY A CUSTOM TABLE FROM A FLAT FILE
Dear Friends,
I have a requirement where i have to upload data from excel file to my custom table so i have used a FM
'TEXT_CONVERT_XLS_TO_SAP' and i have collected data into a internal table , till here i am able to get data correctly , now i hae to upload this data into a custom table .
the flat file is having 6 fields and the custom table is having
8 fields , for uploading the data into this custom table from the internal table where i have collected above iam getting problem . Actually iam using a modify statement to update the custom table .
the flat file which i have collected into the internal table is as below :
IDNo. Name Date Location Designation Dept
101 Raja 4/12/2007 Delhi Manager HR
102 James 4/12/2007 Delhi Clerk HR
Custom table is having the below fields
IDNO. Name Date Location Designation Dept Manager
101 Raja
now when i run the program iam getting the problem while usign the modify statment is the ID no which is already having
a record as IDno = 101 and manger = Raja.......with the other fields name , date, location,designation and dept as blank.
if i want to fill this fields from my flat file the modify statment
just filling all the fields for the ID no = 101 and manager field which already having Raja as being overwritten by space .....
becasue this field is not being there in the flat file.
the code iam using as follows.
The flat file is having with the below structure
TYPES: BEGIN OF t_emp_data,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
end of t_emp_data.
The Custom Table(ZEMP_DATA) is having with the below structure
TYPES: BEGIN OF t_emp_data_table,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
Manager(20) type c, -- this is the extra field in table
end of t_emp_data_table.
data :
it_empdata TYPE STANDARD TABLE OF t_emp_data,
it_empdata_tmp TYPE STANDARD TABLE OF t_empdata_tmp,
wa_empdata_tmp type t_empdata_tmp,
wa_empdata type t_emp_data.
loop at it_empdata into wa_empdata.
move-corresponding wa_empdata to wa_empdata_tmp.
modify ZEMP_DATA from wa_empdata_tmp .
endloop.
could any one please let me know what i have to do inorder to not get the manager field data not being overwritten with the modify statment , for the IDNo. 101 . I want the data which is already ( manager = Raja) shouldnt not be get overwritten with Space.
please help me in this regard
Regards
Madhuri.Hi,
use a slect statement before
"move-corresponding wa_empdata to wa_empdata_tmp."
select manager
from ztable
into wa_empdata_tmp-manager
where id = 100.
regards,
lavanya -
How can I insert jpg/bmp files when composing an e mail?
I want to insert a jpg file into the mail while composing the e mail and avoid sending it as an attachment.
I've tried copy-paste, but it doesn't work.
I tried to drag from another window, that doesn't work either.
I managed to drag a jpg file from another browser (not Firefox), it showed at my end but did not transmit).The question relates more to your email system than to Firefox.
As general comments
* files and images are likely to be sent as attachments
* there may be options as to how they display, hotmail for instance is able to display attatched images in firefox as a slideshow within the email
* sending links rather than attached files is an alternative if the .jpeg is on the web
* Hotmail, also allows whole Office Files to be inserted. (That includes word processor documents containing images)
If it is Hotmail and using windows XP you have tried
* insert | Photos -> web images <br /> left clicking on a displayed image will insert it at the cursor position in the e-mail
Note Hotmail has its own help information, and a help forum [http://windowslivehelp.com/product.aspx?productid=1 {clickable link)] -
Hello,
is it possible to index words from images with tenable effort ?
We are developing a document-management-system and it would be nice
when search includes images.
I would appreciate very much any suggestions, links or solutions.
regards,
Tim>
Do you mean words in images in the sense of an image
comment (which is not visible when the image is
displayed, but some image editors can detect and
expose as an image property), or as text displayed as
part of the image, like this:
http://developer.java.sun.com/images/v4_java_sun_com.gi
If the latter, forget it.Hello,
first thanks for answers, I was looking for a possibility to search for text in images in order to save it in a database.
So its the latter :(
I thought it could be possible to use any scanner-drivers for this purpose:
http://www.openarchive.com/echive_tifindexer.htm
But I'm not sure how to achieve this.
regards,
Tim -
User upload of non JPG image files to be then displayed in iScripts
I am attempting to build a tool for non-technical users to easily create quick link pagelets with icons that point to URLs or Content References. One of the issues I am running into is the image upload PeopleCode commands seem to limit the file type to jpegs. Jpeg do not allow transparent backgrounds which makes it hard to take seals and similar icons and just super impose them over a background. When I looked at the file attachment functions I did not see a way to output a web server URL for image to be included on a page it only looked like there were only ftp server calls. Any thoughts?
-BryanUse the File Attachment API (AddAttachment) to upload files to a database table, and then use an iScript to serve them. This blog post has an example iScript for reading attachments from tables: http://jjmpsj.blogspot.com/2009/01/exporting-attachments-part-2.html.
Chapter 2 of my PeopleTools Tips and Techniques book (http://www.amazon.com/PeopleSoft-PeopleTools-Techniques-Oracle-Press/dp/0071664939) has a complete example including a component for uploading files and an iScript for serving them. I call the component "Web Assets." -
How do i make the background for a BMP file, transparent?
I've been working on an icon for design reasons, and when i save the file as a .BMP, the background appears white. The file i work in has no background and it transparent, except for the icon of course. The dimensions of the icon are 32px by 32px. I can't upload the bitmap file onto this topic, apologies if that hinders anything,
Windows Bitmap – Wikipedia
32 bit-per-pixel BMP (mode ARGB )has a leading byte, which is used by Photoshop
as alpha-channel for variable transparency. That's not a part of the BMP specifications.
It should be avoided, IMHO.
The reason for the introduction years ago has been the faster access by 32 bit
registers (opposed to 24 bpp).
Best regards --Gernot Hoffmann -
How to edit the existing data in the XML file from java programming.
Hi all
i am able to create XML file with the sample data as below from java programming.
i need sample code on how to edit the existing data in the XML file?
for example
<?xml version="1.0"?>
<mydata>
<data1>
<key1>467</key1>
<name1>Paul</name1>
<id1>123</id1>
</data1>
<data2>
<key2>467</key2>
<name2>Paul</name2>
<id2>123</id2>
</data2>
</mydata>
i am able to insert the data in the XML.
now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
Regards
Sunil
[points will be always rewardable]hi
u need a parser or validate the xml file for to read the xml file from java coding u need for this
xml4j.jar u can download this file from here
http://www.alphaworks.ibm.com/tech/xml4j
or we can use the SAX(simple API for XML)
some sample applications for this
http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
http://www.xml-training-guide.com/e-xml44.html
let me know u need any other info
bvr -
How to modify the field lengh of file upload
Hi All,
I am facing a problem with u201Cuploadu201D filed length in BSP application.
When we upload the file in BSP page, the path displayed should be the full path (i.e. from where the file is being upload the file)
Now this field is appearing 20 char length
Now I want to increase the length of the upload field (Input field) to be 100 char so that the path is visible.
In the current application the file upload is being done through a structure (attributes)
In this structure the fields are like this
PAGE_NAME
ID
FOR
TAGS
ROW_INDEX
COLUMN_INDEX
OTR_NAME
REQUIRED_NAME
MAXLENGTH
SIZE
TABLE_NAME
ON_SELECT
VALUE
DISABLED
ONCLICK
TEXT
TYPE
Using this method:
CALL METHOD cl_htmlb_fileupload=>factory
EXPORTING
Id = ls_form_save-id
RECEIVING
Element = lv_fileup.
bee_table->add ( level = 2 element = lv_fileup ).
This cl_htmlb_fileupload is named as class interface.
Which has the CLG_HTMLB_FILEUPLOAD (it is a class) it is defined in attributes.
In this class it has the attribute u201CSIZEu201D by default string 20.
Now I need to change this attribute length from 20 to 100
For this I copied the standard class CL_HTMLB_FILEUPLOAD into ZCL_HTMLB_FILEUPLOAD.
This ZCL_HTMLB_FILEUPLOAD contains all attributes of the standard class CL_HTMLB_FILEUPLOAD
Including the one class (CLG_HTMLB_FILEUPLOAD), this is defined as an attribute (ABOVE MENTIONED?)
This class is appearing in non editable mode, so I have copied this class into zclass (ZCLG_HTMLB_FILEUPLOAD).but still I am not able to edit the attribute called u201Csizeu201D
And also I am not bale to add the zclass in place of the ZCLG_HTMLB_FILEUPLOAD
Kindly tell me how to modify the length of the field u201Csize u201Cand also how to add the zclass in the attributes of one class (syntax)
Thanks in advance
Rambabu.AHi,
Class CLG_HTMLB_FILEUPLOAD is a class automatically generated when a BSP Element is created. You should not change/create such a class, unless by creating your own BSP Element.
As per your requirement, you can use the SIZE parameter of method factory:
ls_form_save-size = '100'.
CALL METHOD cl_htmlb_fileupload=>factory
EXPORTING
Id = ls_form_save-id
Size = ls_form_save-size
RECEIVING
Element = lv_fileup.
Regards,
Tanguy -
I uploaded photos in .jpg format to my iPad, but now all of those photos appear as .ithmb files and cannot be opened, even on the thumbdrive they originated from. How do I get them back to .jpgs?
Sorry, should've mentioned some more information. I synced the ipad to the folder of photos. The original photos had file names like "_MG_4865.jpg" and after syncing the folder in Itunes, all files were now found in a folder called "iPod Photo Cache" which was filled with many folders with labels like "F23" etc. (There were ALOT of photos.) In those folders there are several files with names like "T343.ithmb". Not a .jpg to be found and I can't view any of the photos.
-
Hi Experts,
In my organization in the last financial year i.e. 2006-2007, we have loaded Fixed Assets. Our production Client is active since last fiancial year. Our SAP was also went live for production last year only.
So this is a case of modifying data uploaded amount for fixed assets Accu.Dep. G/L A/c in last finacial year (without Depreciation RUN).
Now, we have found that we have to rectify (modify / correct) the amounts in the G/L Account - Accumulated Depreciation for some Assets / Assets' Classes like Accu. Depr.->Computers, Accu.Dep.->Furniture & Fixtures etc (because some descrepancies have been found).
How can we modify the amounts in these respective Accumualted Depreciation G/L Accounts (they are reconciliation accounts - Assets) and so cannot be directly posted to.
How can we post the rectified / modified amounts and that too in last fiancial year in these Accumulated Depreciation.
Please note that we cannot do Depreciation Run because last year only we also uploaded from legacy data to SAP.
In summary, I want to modify ./ rectify the data uploaded amounts of Accumulated Depreciation G/L Accounts in last fiancial year when our SAP also went into production client.
I will definitely award points with open heart
Now it is production client.Hi
Is Acc Depn as per asset accounting and Acc Depn in GL balances matching right now? In such case how are you planning to make changes in AA if you are correcting in GL?
Check status of company code for asset transfer - Is it in status 1 (Asset Transfer not completed)?
Besides how are you going to take the impact of changes to Acc Depn for past year - are u planning to open periods of last year?
I assume that you loaded the asset values last year (may be 12/31/2006) and posted GL balances as of 12/31/2006 and carried forward of GL balances to 2007.
Please provide some details so that we can take it from there.
Thanks
Satya -
How to get the pull path name from a file upload window
Hello everyone!
I have encountered the following problem with the following JSP code:
<form method="post" action="filename.jsp">
Upload JAVA program:
<input type=file size=20 name="fname" accept="java">
<input type=submit value="go">
</form>
<%
String s = "";
if (request.getParameter("fname") != null)
s = request.getParameter("fname")
%>
The value of s is alway the filename. However I want to get the full path in addition to the filename, so that I can read the file. Does anyone know how to get the pull name of the file?
thanks a lot in advance,Dear Sir,
thanks a lot for your reply. Please let me explain what I intended to do: I want to upload a file from the local machine and then read the content of the file. Therefore I need to the fullpath of the filename like /var/local/file.java instead of file.java. The latter is what I got.
The problem I have with your code is that the function like "request.getServerScheme()" is not recognized. Maybe is it because I didn't install servelet package? I only installed javax package btw. Also my application runns on Tomcat server if this could give you some information. The error message I had is as follows:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:133: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
url = request.getServerScheme()
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:136: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
+ ((("http".equals(request.getServerScheme()) && request.getServerPort() != 80)
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:137: cannot resolve symbol
symbol : method getServerScheme ()
location: interface javax.servlet.http.HttpServletRequest
||("https".equals(request.getServerScheme()) && request.getServerPort() != 443))
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:139: cannot resolve symbol
symbol : method getServletConfig ()
location: interface javax.servlet.http.HttpServletRequest
+ "/" + request.getServletConfig().getServletName()
^
An error occurred at line: 36 in the jsp file: /addExercise.jsp
Generated servlet error:
/usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:140: cannot resolve symbol
symbol : variable path
location: class org.apache.jsp.addExercise_jsp
+ "/" + path
^
5 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) -
How to avoid the split problem when uploading the data from csv file
Dear Friends,
I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
i am using the code as below , please suggest me what i have to do in this regard
SPLIT wa_raw_csv AT ',' INTO
wa_empdata_csv-status
wa_empdata_csv-userid
wa_empdata_csv-username
wa_empdata_csv-Title
wa_empdata_csv-department.
APPEND wa_empdata_csv TO itab.
in the flat file i can see for one of the record for the field Title as
Director, Finance - NAR............there by through my code the wa_empdata_csv-Title is getting splited data as "Director, and Department field is getting Finance - NAR" , i can see that even though " Director, Finance - NAR" is one word it is getting split .
.......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
"Director,Finance - NAR" wil not be split into two words.
Thanks & Records
MadhuriHi Madhuri,
Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
If you are generating the file, use tab instead of comma.
If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
Regards,
Mohaiyuddin
Maybe you are looking for
-
HT2500 How do I add a disclaimer footer to my email signature?
How do I add a disclaimer footer to my email signature?
-
Auto-Brightness on iPad mini Retina is not working properly.
Hello! Noticed that the Auto-Brightness on iPad mini Retina is not working properly. It works correctly only when such a dark place, then unlock the iPad brightness will be at a minimum. Likewise, if unlock iPad in a room with light, the brightness w
-
FBRA : Balance of line items is not zero
Hi all, When we are trying to reset a clearing document using FBRA, we are getting the message that " Balance of line items is not zero ".. Can you please suggest why we are getting this error..The debits and credits both match and are equal to zero.
-
import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import javax.swing.*; import java.util.Random; public class TicTacToe extends JFrame { private Board board; static final char BLANK=' ', O='O', X='X'; private char position[]={
-
ADF Faces inputFile/progressIndicator question
I'm using JDeveloper 10.1.3.1.0 on WinXP SP2, JDK 1.5. I'm trying to use af:inputFile with an af:progressIndicator to track the progress of uploading and processing the file. While the basic setup I have works, it's ugly and intrusive to the user. Th