I'm assuming you "exported an application from Development [and committed that script to a code repository]"
You'll need to "export the images from Development and commit them to the code repository" also.
When you export the image does it create an install script?
David of Earth wrote:
I'm running APEX 5.1. I have setup my DEV and TEST instances and setup TEST as run-time only. I exported an application and imported it into the TEST instance by now my images are missing. I read another note here that said images aren't included in the application export in APEX 5.
What "note"? Please provide a link.
How am I supposed to migrate images into run-time only instance?
It depends on exactly what you mean by "images". In order to get an effective response to your questions it's necessary to unambiguously communicate the requirements using standard APEX, Oracle, and web terminology.
I don't have the link. I read it in another comment when I searched this space, hoping it's not correct. The image is stored as a workspace file. I need to export and import from my development instance to my test instance. For some reason it's not included in the workspace or application export.
Since we are talking about APEX Lifecycle, I figure this Oracle Whitepaper might help out.
I found what I needed over at Orcado. The following will generate an install script for whatever file you want to migrate to another APEX instance. Just save the output as an SQL script and run in other instance.
-- create a script to import images
-- workspace to export the static file from
-- cursor for all static workspace files
cursor c_file is
from apex_050100.wwv_flow_company_static_files w
join apex_050100.wwv_flow_companies c
on c.provisioning_company_id = w.security_group_id
where c.display_name = '<WORKSPACE NAME>'
AND w.file_name = '<FILE NAME>';
-- loop throug all files
for r_file in c_file loop
-- start pl/sql block
-- set the security group id to make it possible to use the script outside APEX (toad,sqldeveloper)
dbms_output.put_line(' wwv_flow_api.set_security_group_id(p_security_group_id=> '||r_file.security_group_id||');');
-- create varchar table to hold the data for the BLOB
dbms_output.put_line(' wwv_flow_api.g_varchar2_table := wwv_flow_api.empty_varchar2_table;');
-- loop through LOB in blocks of 200 to improve readabiliy of the end script
for i in 1 .. trunc(dbms_lob.getlength(r_file.file_content)/200)+sign(mod(dbms_lob.getlength(r_file.file_content),200))
-- save to raw file data from the blob to a varchar table
dbms_output.put_line(' wwv_flow_api.g_varchar2_table('||i||') := '''
-- create the create_workspace_static_file procedure with the correct parameters
dbms_output.put_line(' p_file_name => '''||r_file.file_name||'''');
dbms_output.put_line(' , p_mime_type => '''||r_file.mime_type||'''');
dbms_output.put_line(' , p_file_charset => '''||r_file.file_charset||'''');
-- convert the varchar table to a blob as input for the procedure
dbms_output.put_line(' , p_file_content => wwv_flow_api.varchar2_to_blob(wwv_flow_api.g_varchar2_table)');
-- commit your work
Did have to remove some unprintable characters at the beginning of lines created by above script.