Oracle apex upload images ajax CLOB_CONTENT not filled
I'm working with 4.2.5.00.08 on Oracle 12.1.0.2- 64 on Windows.
What am I doing wrong with this code.
I created a HTML5- dropbox to upload an image
This "always" worked, but now I don't seem to get it working again.
To be exact: the C001 column of the CLOB_CONTENT stays empty.
I have the feeling I'm overlooking something, but I can't put my finger on it.
Someone who sees the problem?
ON DEMAND PROCES : dummy
begin
insert into m2b_images
( id, blob_content
select 1
, apex_web_service.clobbase642blob
( dbms_lob.substr( col.clob001
, dbms_lob.getlength(col.clob001)
, dbms_lob.instr(col.clob001,',',1,1) + 1
from apex_collections col
where col.collection_name = 'CLOB_CONTENT'
and col.c001 is not null;
exception
when others
then
rollback;
htp.p(sqlerrm);
end;
Javascript on the page (on the page there's a div dropbox and a div droplabel)
<script>
(function dropboxFunctionality() {
var dropbox;
function dragExit(evt) {
evt.stopPropagation();
evt.preventDefault();
function dragEnter(evt) {
evt.stopPropagation();
evt.preventDefault();
function dragOver(evt) {
evt.stopPropagation();
evt.preventDefault();
function handleReaderLoadEnd(evt) {
var clobObj = new apex.ajax.clob(function (p) {
if (p.readyState == 4) {
$("#droplabel").html("Uploading...");
var get = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=dummy', $v('pFlowStepId'));
gReturn = get.get();
if (gReturn === "") {
$("#droplabel").html("Ready...");
} else {
alert(gReturn);
clobObj._set(evt.target.result);
function handleFiles(files) {
var file, reader;
file = files[0];
$("#droplabel").html("Processing " + file.name + "...");
reader = new FileReader();
reader.readAsDataURL(file);
reader.onloadend = handleReaderLoadEnd;
function drop(evt) {
var files, count;
evt.stopPropagation();
evt.preventDefault();
files = evt.dataTransfer.files;
count = files.length;
if (count > 0) {
handleFiles(files);
if (window.File && window.FileList && window.FileReader) {
dropbox = document.getElementById("dropbox");
$("#P2_FILE_NAME").hide();
$('#P2_UPLOAD').hide();
dropbox.addEventListener("dragenter", dragEnter, false);
dropbox.addEventListener("dragexit", dragExit, false);
dropbox.addEventListener("dragover", dragOver, false);
dropbox.addEventListener("drop", drop, false);
} else {
$("#dropbox").hide(); //No drag and drop supported. Hide the container
</script>
really? Nobody saw that i checked for the wrong column c001 instead off clob001.
ah well
Similar Messages
-
Upload image that is not in local file system
We have an abomination of a project where we are trying to upload employee images into our main 'People' form. The only issue is that the images exist on a SQL Server database. I can get the images onto the Oracle server easily enough but the functionality does not exist to browse to a remote server, just the local machine. Has anyone had to do something like this before? If it was just a few images we could FTP them to a mapped drive and do it 1 by 1 but we are talking about 15000 images so that is not an avenue we would care to explore. Any advice would be welcome.
Hi,
Please see if these threads help.
API to load images for
API to load images for
Employee Photo Upload in HRMS
Employee Photo Upload in HRMS
Dispay employee pictures in Employee Self Service screen
Dispay employee pictures in Employee Self Service screen
Regards,
Hussein -
ADD FILES FOR UPLOAD - IMAGE PATHS DO NOT WORK IN WIDGETS
Hi There
I'm trying to add my own images to a widget I bought from Qooqee - the Wrapper_v2 image slider. But when I try to add my own images with the image path it doesn't work. I've tried adding the image with 'Add Files for Upload' - and then using the full path which I get from right clicking on it in the assets panel - but it still doesn't work.
Most of the widgets require you to either specify the image path, or an external URL. I do not want to use a third party image hosting site to get URL's for every image I want to use on the site - so I just need to know what I'm doing wrong with the Add files for Upload - why do my file paths not work in the widgets?Provide the name of the program you are using so a Moderator may move this message to the correct program forum
This Cloud forum is not about help with program problems... a program would be Photoshop or Lighroom or Muse or ???
Also, you need to ask for help from the widget maker -
Can I upload images that are not photos?
Alright, so to start off I am new to macs. I want to make a website for a project I am currently working on and I want to include on a few of my pages some .jpg/.gif files that are not photos. I have tried looking through everywhere to figure out how to upload them. Can I do it? Or am I being an idiot and just missing something? Thanks
Ah ha, I had missed it at first but now I am enlightened. Just go to Insert and click on choose to add the file. Silly me.
-
Getting DYNPRO_SEND_IN_BACKGROUND this error while uploading image
hi have created a bsp program in local object and i m not getting error,but now i have crated this program in packege , so when ever i uploding image in page every time getting this error , please help me
The following error text was processed in the system:
*Sending of dynpro SAPLSTRD 0300 not possible: No window system type specified*
Exception Class *CX_SY_SEND_DYNPRO_NO_RECEIVER*
Error Name *DYNPRO_SEND_IN_BACKGROUND*
Program *SAPLSTRD *
Include *LSTRDU30 *
Line *186*
i m uploading image using code not manually and using htmlb:fileupload tab.
getting here at this point
*upload new file INTO MIME OBJECTS
o_mr_api->put(
EXPORTING
i_url = lv_url
i_content = lv_xstring
i_suppress_package_dialog = 'X'
i_new_loio = l_loio
EXCEPTIONS
parameter_missing = 1
error_occured = 2
cancelled = 3
permission_failure = 4
data_inconsistency = 5
new_loio_already_exists = 6
is_folder = 7
OTHERS = 8 ).
ThanksHi Prashant,
I worked on your code and found that the exception is thrown in the standard FM..
CALL FUNCTION 'SKWF_NMSPC_IO_FIND_BY_ADDRESS'
EXPORTING
url = l_url "parent url
appl = wbmr_c_skwf_appl_name
IMPORTING
io = g_parent_loio
error = l_error. "is also set, if l_url not found !
Reason:
I named my BSP application Z_MIMEUPLOAD I was getting dump when ....
In layout and in OnInputprocessing I used ZTEST_MIMEUPLOAD instaed of Z_MIMEUPLOAD
The dump disappered as soon as I corrected the BSP application name everywhere in the application.
Please check the url and application name everywhere in your code.
Also replace the code:
CONCATENATE 'http://siildev.siil.com:8001/sap(bD1lbiZjPTc3Nw==)/bc/bsp/sap/zprbsp_002/' wa_file into
By this:
CONCATENATE 'http://siildev.siil.com:8001/sap(bD1lbiZjPTc3Nw==)/bc/bsp/sap/zprbsp_002/PAGE_NAME' wa_file into
That is add page name to url in layout.
I am not sure what is hapening in your code but this is what I found.
Hope it helps you.
Regards,
Anubhav -
APEX 4.0 - AJAX not working with Popup LOV field
Hello,
In the application I have built I have three fields which are 'feeded' by selects via a AJAX construction.
All three fields are based on three others, which are PopUp LOV fields. Up to version 3.2 I had no problems: the fields were 'refreshed' as expected when in the 'parent' field a specific value was entered or choosen by the Popup Lov selector.
But since the migration to APEX-4 (lin a test-system) all the three fields are not correctly refreshed anymore: two of them give the value 'undefined', the third, which is a select-list shows values, but at the moment I try to click on the select-list down arrow to pick a value, the list is emptied and stays that way.
More specific about the third field:
item 1 is a popup-lov defined item in which a user can type a value, but can also choose a value from a popup-lov. Item 2 is based on item-1: it does a select based on the value of item-1 and refreshes a select-list. Item-2 is defined as a select list.
I got it all working when making item-1 also a select list, but since the list can become very large, I made a Popup lov of it. Most users do know what code they have to enter and in case somebody is not sure, the lov can be used.
In this forum I came across a problem with AJAX callback, which was answered by Patrick Wolf, saying that in an htmldb_Get ( ... ,0) the last 0 should be replaced by $v('pFlowStepId'), but this did not fix my problem. I have the feeling that the problem is somewhre else, since on first hand, after entering a value in item-1 I see item-2 refreshed with the correct values, but the moment I try to select one item, the list is emptied.....
I hope I made it clear what my problem is and that somebody can help me, else APEX-3.2 was the latest version for this application....
Thanks in advance and best regards,
Jan.
Edited by: user13110728 on 9-aug-2010 8:44Hi Jan,
the problem is the
onBlur="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"on P21_GBREKNR. This is getting attached to the HTML input text field but as well the the anchor link which opens the popup. So when you leave the text field the cursor will be put onto the icon to open the Popup LOV. When you press tab another time or leave the anchor link by clicking somewhere the above JavaScript function is fired again. But the problem is that "this" this time points to the anchor and not the text item anymore, so it will return an invalid value when you access this.value in your f_P21_select_kostenposten function which results in an empty result of your on-demand call.
I still have to investigate why the above JavaScript code is now added to the anchor link as well. But as a workaround, just change your code to
onChange="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"which is better anyway, because it's just firing when the value really got changed. And because the anchor link can't really be changed, the event will never fire when you leave the anchor. BTW you can use the Application Search feature to search for all your onBlur events. onChange is much better than onBlur because it doesn't fire that often unintended.
But if you want to use some of the new APEX 4.0 features, you could use the cascading LOV feature of APEX 4 and avoid all this JavaScript and on-demand code which you have written.
I have changed your application to take use of it.
1) I changed the LOV query for P21_KOSTENPOST from
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from kostenposten
where vervallen is null
and bedrijf = :P21_BEDRIJF
order by gbreknr, kostenpostto
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from kostenposten
where vervallen is null
and bedrijf = :P21_BEDRIJF
and (:P21_GBREKNR is null or gbreknr = :P21_GBREKNR)
order by gbreknr, kostenpostas it was in your on-demand process. The query will return all values if P21_GBREKNR is null but will restrict it if the field is filled out.
2) Set "Cascading LOV Parent Item(s)" to P21_BEDRIJF,P21_GBREKNR Because based on your LOV query I assume "Kostenpost" should be refreshed if one of the two fields gets changed.
3) Set "Optimize Refresh" to No because one of your parent items (P21_GBREKNR) can contain a null value.
4) Removed the onBlur/onChange from P21_GBREKNR
5) Removed the *%null%* from the "Null Return Value" attribute of P21_BEDRIJF, because that will cause a ORA-1722 if someone picks "-- kies: --"
That's it.
Have a look at dynamic actions and the "Set Value" action as well, because I think that could remove your other on-demand calls as well without having to write any JavaScript code.
I will still investigate what's going on with the anchor link in APEX 4.0
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins -
How to create image button in oracle apex 3.1
Hi,
I am new to oracle apex.
I would like to show button called Delete as image icon for the same i have saved the button attributes as mentioned below
Button= Style Image
Button Image #WORKSPACE_IMAGES#delete_row_64.gif
But it is not no showing image, displaying like image not available.
Please any one help me how solve this issued
Please helpe me where i need store images which i can use as image icon for page item .
Thanks and regards,
Ibrahim Sayyed.Thanks you so much Gus, I got it.
Thanks and regards,
Ibrahim Sayyed. -
Page-embedded Javascript and uploaded images are not cached.
Hello All,
I was reading in Wiki APEX and I found this line mentioned as cons: "Page-embedded Javascript and uploaded images are not cached".
The question that I have posted many questions here how to enable the cache for Images and Javascripts but didn't get it right, is the wiki info right about the cache for images and JS?
thanks,
Fadi.Look at the bottom of this page as well [http://carlback.blogspot.com/2007/12/apex-and-3rd-party-js-libraries.html]
Patrick Wolf
Carl,
the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
Carl Backstrom
In 3.1 we emit a last modified header now for uploaded files so that should help with browser caching.
I wonder if anything's changed since then.
Kofi -
APEX Upload file feature resulting in 404 Page Not Found error
Hi,
I have a page where the user selects the local file to upload and submits it to another page. It has been working fine for the last few years. Yet recently when there's a submit with the file for upload, it says "404 page not found" regardless of which page it branches to. If I leave the file upload field blank, it doesn't have that problem.
Any advice? Thanks.Hi,
have a look at http://www.inside-oracle-apex.com/oracle-apex-got-404-not-found-2/ to get the reason of the 404 error. If you are using the Embedded PL/SQL Gateway (EPG) have a look at the comments where I link to a description what you have to do for EPG.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins -
Uploading an excel sheet data using Oracle APEX 3.2
Hi All,
Please help me out to upload excel sheet data using oracle APEX 3.2.
Am following the steps mentioned in the below link, but even after that am getting an error saying no data found
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Please help me to proceed further.
Regards,
SakthiHi Andy,
Thank you very much for looking into my thread.
Actually i followed everything that is been mentioned in "http://avdeo.com/2008/05/21/uploading-excel-sheet- using-oracle-application-express-apex/" and i got a successful result.
But, with the above process I can only upload a .csv format excel and not a .xls format excel file.
Thats where i got stucked and unable to find any clue on how to move further to achieve in uploading .xls file.
It would be very great if you guide me through in this process.
Shiva -
Can not upload image of larger size in jsf
i had some issues in file uploading. File uploading is working fine in my local machine and when i am using the www.mywebsite.com:8080/fileUpload.jsf
but i can not upload images by using the following www.mywebsite.com/fileUpload.jsf
Ie: without the port. I am using windows server and tomcat 5.5.27
When i am trying to upload a bigger size image i am getting the following error
I am using jsf(tomahawk)
09:10:47,315 ERROR MultipartRequestWrapper:? - Exception while uploading file.
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Socket read failed
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:85)
at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:181)
at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)
at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:91)
at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:159)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.getSequenceString(JspStateManagerImpl.java:260)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:230)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:267)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:231)
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:81)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.zerone.rrs.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:444)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:472)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
at java.lang.Thread.run(Unknown Source)Never mind . problem solved after i restarted
-
I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?
Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.
-
Seeing this error in the apache log:
File does not exist: /export/home/oracle/orahtml/marvel/images/spacer.gif
I know there are spacer.gif files under the theme folders but why is it looking for a spacer.gif file in the images folder? Is this a bug?Hello,
Yes I just checked it's a problem with theme 9 there are a couple of places where the theme calls #IMAGE_PREFIX#spacer.gif when it should call #IMAGE_PREFIX#themes/theme_9/spacer.gif
There are two ways for you to fix this
1. Copy themes/theme_9/spacer.gif to the top level images directory, I recommend this one because then if someone creates the theme from the repository again it wont' come up agian.
2. Change all #IMAGE_PREFIX#spacer.gif to #IMAGE_PREFIX#themes/theme_9/spacer.gif in theme 9, if you export the theme you can just us a search and replace the export to do this and then reapply the theme.
This as been bugged and will get fixed in future version.
Carl -
"file does not exist on remote server" when uploading image
As the title says, when uploading an image im getting the
message "file does not exist on remote server"......yet dreamwever
has uploaded the file, its there. All other pages on my website
work fine when uploading images. Any ideas?What image type is it? Is it in an images folder or the root
directory? It would be helpful to post a link. -
Upload image into mysql database residing on remote server is not working?
hello to all,
i need ur help,we hav online site .
i have to upload image(which can b from any pc) into mysql database residing on remote server of which we (don't hav actual path of that server).
the solution i'm using is working correctly on local bt when transfer it to server it shows
java.io.FileNotFoundException: (No such file or directory)
i have used multipartRequest to access parameter of file type input.
all variables and related packages r imported properly.no prblm in that.
code is here....................................
try {
MultipartRequest multi = new MultipartRequest(request, ".", 500000 * 1024);
File f = multi.getFile("uploadfile");
out.println(f.getName());
filename = f.getName();
String type = multi.getContentType(f.getName());
fis=new FileInputStream(filename);
byte b[]=new byte[fis.available()];
fis.read(b);
fis.close();
Blob blob=new SerialBlob(b);
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://10.1.52.206:3306/test?user=root&password=delhi");
String query="insert into uploads (FILENAME,BINARYFILE,) values (?,?)";
pstmt=con.prepareStatement(query);
pstmt.setString(1,filename);
pstmt.setBlob(2,blob);
int i=pstmt.executeUpdate();
if(i>0)
out.println("Image Stored in the Database");
else
out.println("Failed");
} catch (Exception ex) {
out.print("*******************"+ex);
ex.printStackTrace();
please suggest me the way to upload image to remote server** not on local server.
its urgent.
Edited by: JavaDevS on Jul 28, 2008 11:41 AMi need ur help,we hav online site .Please don't use these juvenile abbreviations. It's impolite when you're asking for assistance not to make the effort to spell out all of the words. Moreover in a forum with an international readership the use of standard English will reduce the possibility of confusion.
I presume that your file upload is being placed in a different directory from that which you were expecting. I would suggest logging all paths (specifically filename) to see if this is an unexpected value.
Please explain further what you mean by "local" - is this a stand-alone application, or merely running a copy of the server on your local machine and doing the transfer (via the browser) to that? Are there any other differences such as the browser used?
Maybe you are looking for
-
Hi I have a problem with ping in VPN Client, In this senario, the VPN client should be able to ping PC-4 through ASA-1 (Site-A)but it could not. The router is able to ping Z.Z.Z.0/24. The Tunnel and VPN client are working. 1. PC-1 can connect to ASA-
-
Inserting a pause at the end of a loop in a film clip...
Hi, I just scanned in 16 frames from old 16 mm film and created a short clip in .swf, by default the clip is looping. I want it to loop, but all I want to do is place a 5 second pause at the end of the short 1 second clip before it starts up again.
-
Elements 10-recvd disc from Adobe for Elements 11??
But Adobe doesn't seem to trying to fix or suggest solutions to those of us that have purchased both 10 and premier 10... other than a discount for 11... However, what's to say that 11 won't do the same thing??
-
Why is everything appear squeeze in my GUI
Hi I have created a JPanel that contain a bunch of buttons and a JScrollpane that contain a table. The JPanel is then add to a JFrame. The problem is that when I run my program, the label in the button which should appear as ----------- | newcat | |
-
Simple Question - Do I want to update?
Hey everyone... For awhile iTunes and my iPod have wanted me to update the software or whatever, but earlier I read that people were having problems with recent updates. Are the newest updates okay or would I be better off with the old softwear? I'm