Uploading and Downloading Document
Hi Experts,
I Have a requirement like Uploading the Document in a Module Pool Application(Custom), the document can be in any format like PDF,DOC,XLS,TXT with unpredictable format. While Creating the Document in the The Business person will Upload the Document and it need to save in the data base. The Document should be viewed in Display Mode.
Please Suggest that is it Possible By using normal ABAP or do i need to move the Development to Work flow/DMS (Document Management System).
Thanks in Advance.
Kranthi Kiran
Hi Kiran,
Try FM, ARCHIVFILE_CLIENT_TO_SERVER.
This will enable us to upload file from desktop and store it in al11 path.
Or transaction CG3Z.
Thanks,
Anil
Similar Messages
-
Editing and uploading a downloaded document
Have an application that allows for both uploads of documents (using a File Browse item and transferring the relevant fields from the HTMLDB_APPLICATIION_FILES view to my customized table) and downloads of documents (using a call via a URL to a customized copy of the Oracle download procedure presented in the sample application). Both the upload and download process work OK.
The issue I'm running into, is that when a user wants to download a document, the user is presented with the choice of opening or saving the downloaded document. That works OK, but what we'd really like to do is offer the user a chance to edit the downloaded document and then by saving the changes (such as by closing the window in which the downloaded document appears, after making edits), the modified document is "re-uploaded" to the database. What we have to do now is save the download document to the user's PC, then the user has to open the document and modify it, save it, and re-upload it to the database.
Any ideas on how we can save the users a few steps and upload the document directly after editing? Thanks.Well, you can only do that when the content being edited is plain text (mime type text/plain) and less than 32K (hard limit in PL/SQL)
Looking at how that page (4000:46) is built in f4000.sql, there seem to be some APIs that do some magic
l_text := wwv_flow_utilities.clob_to_varchar2(
wwv_flow_utilities.blob_to_clob(p_blob=>l_blob,p_charset=>l_charset));Clearly, all these are undocumented internal-only Oracle APIs that Oracle is not obliged to support.
Search around on asktom.oracle.com, I am sure you will find code examples that do this sort of thing.
Hope this helps. -
Upload and download the file same name but different extension from the document library.
HI,
I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.
I am having the mandatory File ID for the each Document.
I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.
Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column
Please find the below screen shoot for the reference.thanks ashish
tried
My requirement is to create the folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
I able to check for the parent folder.
But cant able to check the subfolder in the document library.
How to check for the sub folder in the document library?
Here is the code for the folder IsFolder alredy Exist.
private string IsFolderExist(string InputFolderName)
string retStatus
= false.ToString();
try
ClientContext context
= newClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
context.Credentials = CredentialCache.DefaultCredentials;
List list
= context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
FieldCollection fields
= list.Fields;
CamlQuery camlQueryForItem
= new CamlQuery();
camlQueryForItem.ViewXml = string.Format(@"<View
Scope='RecursiveAll'>
<Query>
<Where>
<Eq>
<FieldRef Name='FileDirRef'/>
<Value Type='Text'>{0}</Value>
</Eq>
</Where>
</Query>
</View>", @"/sites/test/hcl/"
+ InputFolderName);
Microsoft.SharePoint.Client.ListItemCollection listItems
= list.GetItems(camlQueryForItem);
context.Load(listItems);
context.ExecuteQuery();
if (listItems.Count
> 0)
retStatus = true.ToString();
else
retStatus = false.ToString();
catch (Exception ex)
retStatus = "X02";
return retStatus;
thanks
Sundhar -
Uploading and downloading files from a web app (Urgent!!)
Hi everyone:
I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
I need to do the following:
- Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
- Retreive the file so that it can be downloaded from another web page.
The file can be a PDF, WORD DOC, etc...
I now that I can do this with InterMedia but I haven't figured out how :(
Can anyone please point me to an example or some documentation that can guide me through the process.
DB VERSION: 8.1.7
IAS VERSION: 1.0.2.2
Thanks,
Carlos AbarcaThe idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
insert_new_photo( new_description IN VARCHAR2,
new_location IN VARCHAR,
new_photo IN VARCHAR2 )
It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
Hope this helps,
Larry -
Uploading and downloading blobs without wwv_flow_files
Hi,
I am currently working on oracle 10g database and application express.
i went throu the material to upload and download images, pdf from a htmldb book.
it was excellent material. but the book only gave example about loading and downloading images, pdf through flows_files.wwv_flow_files view.
it seemed like we can only d/l the pdf, images and display on htmldb report only throu flows_files.wwv_flow_files view, as in the case of the script below
select
wff.id, htf.anchor( 'p?n=' || wff.id, wff.filename ) filename_1,
wff.filename filename_2, ed.abstract abstract
from
wwv_flow_files wff, easy_document ed
where
wff.name = ed.name;but is there a way to load and download images, pdfs from my own tables without the involvement of flows_files schema.
if then how can i modify the above code to get the pdf from the following table
TableA (vessel number, cruise number, pdf blob)
here for every (vessel, cruise) combination there is a pdf.
how can i get this pdf displayed in my htmldb report.
Can someone guide me please.
Thanks,
Philip.Hi,
I tried the document link you gave and it looks like, i can directly download pdfs from my own tables without needding to upload to wwv_flow_files_objecst$ table.
i modified the procedure in the document accroding to my requirements and it worked.
in my page i show a grid with the parameters and the pdf documentname as download link.
when i click on the link a popup window with the option to save or open comes up.
but the popup window shows the filename as my procedure name through which i pass the id for the pdf document instaed of the filename which is shown as download link on the page.
How can i change this popup window filename to the default file name shown in the download link.
so that everytime i select the parameters, the page shows the pdf filename as link and on clicking the link the popup window should be able to show the same name shown as link.
i think this can be set either at the procedure level or at the page level.
and this is the following contents of the procedure
-- SET UP HTTP HEADER
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa_util.mime_header( nvl('PDF','application/octet'), FALSE );
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || B_LEN);
-- the filename will be used by the browser if the users does a save as
-- htp.p('Content-Disposition: attachment; filename="'||'CR'||VES||CRU||'.PDF'|| '"');
-- close the headers
owa_util.http_header_close;
-- download the BLOB
wpg_docload.download_file( BREP );and this is what i did at the page level. for that particular column i went to link option and the foll is what i gave:
Link Text: CR#VESSEL##CRUISE#.PDF
Link Attributes: target="_blank"
URL: #OWNER#.PROC_DOWNLOAD_PDFS?V=#VESSEL#&C=#CRUISE#
Here the link text is the filename that i wanted to show when saving the file.
Can someone guid eme please.
Thanks,
Philip. -
Using CSA to filter MSN Messenger file upload and download
How would i go about filtering out the file upload and download functionality in messenger ?
I've already disallowed the possibility of uploading or saving from Messenger by not allowing the program the read or write files. But when a PC without this policy on it uploads to a CSA protected host. The CSA will download the entire file but then refuse to save the file.
I'd rather disallow this functionality alltogether ? my guess are that i would hae to do some COM filtering ?
I'd be greatfull for any hints you might have.
Best Regards,
LasseThe document Blocking Peer-to-Peer File Sharing Programs with the PIX Firewall has more information on blocking file sharing applications.
http://www.cisco.com/en/US/tech/tk583/tk372/technologies_tech_note09186a00801e419a.shtml -
Reg :File upload and download from client machine
hi..
anyone help me the way that how to upload and download word
document file from client machine.. i am using j2eeserver1.4 in linux..
i want upload file from client machine(windows) to server(linux.) please
help me . tell me idea regarding..
i have tried this coding.. but i can transfer txt file. only. when i upload mirosoft word file.. it will open with some ascii values with actual content.
<!-- upload.jsp -->
<%@ page import="java.io.*" %>
<%String contentType = request.getContentType();
String file = "";
String saveFile = "";
FileOutputStream fileOut = null;
if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
DataInputStream in = new DataInputStream(request.getInputStream());
int formDataLength = request.getContentLength();
byte dataBytes[] = new byte[formDataLength];
int byteRead = 0;
int totalBytesRead = 0;
while (totalBytesRead < formDataLength)
byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
totalBytesRead += byteRead;
try {
file = new String(dataBytes);
saveFile = file.substring(file.indexOf("filename=\"") + 10);
saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
saveFile = saveFile.substring(saveFile.lastIndexOf("/") + 1,saveFile.indexOf("\""));
int lastIndex = contentType.lastIndexOf("=");
String boundary = contentType.substring(lastIndex + 1,contentType.length());
int pos;
pos = file.indexOf("filename=/" + 1);
pos = file.indexOf("\n", pos) + 1;
pos = file.indexOf("\n", pos) + 1;
pos = file.indexOf("\n", pos) + 1;
int boundaryLocation = file.indexOf(boundary, pos) - 4;
int startPos = ((file.substring(0, pos)).getBytes()).length;
int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
String folder = "/tmp/uploads/";
fileOut = new FileOutputStream(folder + saveFile);
fileOut.write(dataBytes);
fileOut.write(dataBytes, startPos, (endPos - startPos));
fileOut.flush(); } catch(Exception e) { out.print(e);
} finally
{ try
{fileOut.close();
}catch(Exception err)
%>
please which package will help me to upload word document file with no errror. send me how can use in ftp.. send me some sample program..
Regards..
New User M.Senthil..Hi,
Well,i don't know whether if this helps people here are not.
It is always a good practise to do it via Servlet and then download content.
The adavantage of doing this is
1). You may not need to pack the downloadable with the .war which you ultimately genrate which ceratinly help us in terms of faster deployment.
3). You may update the new content just by moving a file to the backup folder.
2).One may definately download the content irrespective to the content/file.
Hope example below helps..
Configurations:
In the above example we are assuming that we placing all downlodable file in D:/webapp/downlodables/ and you have configured the same path as a init param with the name "filePath" in your web.xml.
something like the one below.
<servlet>
<servlet-name>DownloadServlet</servlet-name>
<servlet-class>com.DownloadServlet</servlet-class>
<init-param>
<param-name>filePath</param-name>
<param-value>D:/webapp/downlodables/</param-name>
<!--Could use any backup folder Available on your Server-->
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>DownloadServlet</servlet-name>
<url-pattern>/downloadFile</url-pattern>
</servlet-mapping>DownloadServlet.java:
==================
package com;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.activation.MimetypesFileTypeMap;
*@Author RaHuL
/**Download Servlet
* which could be accessed downloadFile?fid=fileName
* or
* http://HOST_NAME:APPLN_PORT/ApplnContext/downloadFile?fid=fileName
public class DownloadServlet extends HttpServlet{
private static String filePath = new String();
private static boolean dirExists = false;
public void init(ServletConfig config){
// Acquiring Backup Folder Part
filePath = config.getInitParameter("filePath");
dirExists = new File(filePath).exists();
private void processAction(HttpServletRequest request,HttpServletResponse response) throws Exception{
// Some Authentication Checks depending upon requirements.
// getting fileName which user is requesting for
String fileName = request.getParameter("fid");
//Building the filePath
StringBuffer tFile = new StringBuffer();
tFile.append(filePath);
tFile.append("fileName");
boolean exists = new File(tFile.toString()).exists();
// Checking whether the file Exists or not
if(exists){
FileInputStream input = null;
BufferedOutputStream output = null;
int contentLength = 0;
try{
// Getting the Mime-Type
String contentType = new MimetypesFileTypeMap().getContentType(tFile.toString());
input = new FileInputStream(tFile.toString());
contentLength = input.available();
response.setContentType(contentType);
response.setContentLength(contentLength);
response.setHeader("Content-Disposition","attachment;filename="+fileName);
output = new BufferedOutputStream(response.getOutputStream());
while ( contentLength-- > 0 ) {
output.write(input.read());
output.flush();
}catch(IOException e) {
System.err.println("Exception Occured:"+e.getMessage());
System.err.println("Exception Localized Message:"+e.getLocalizedMessage());
} finally {
if (output != null) {
try {
output.close();
} catch (IOException ie) {
System.err.println("Exception Occured:"+e.getMessage());
System.err.println("Exception Localized Message:"+e.getLocalizedMessage());
}else{
response.sendRedirect("/errorPage.html");
public void doPost(HttpServletRequest request,HttpServletResponse response) throws Exception{
processAction(request,response);
public void doGet(HttpServletRequest request,HttpServletResponse response) throws Exception{
processAction(request,response);
NOTE: Make sure You include activations.jar in your CLASSPATH b4 trying the code.
therefore,if you have something like above set as your application enviroment in the above disccussed
can be done by just giving a simple hyper link like
<a href="downloadFile?fid=fileName.qxd" target="_blank">Download File</a>REGARDS,
RaHuL -
File Upload and Download in Oracle iAS PL/SQL Gateway
i'm using the example 113471.1 to "File Upload and Download in
Oracle iAS PL/SQL Gateway"
when i press the submit button after i select a file to upload
i get the next message in the browser "No se puede mostrar la
pagina" HTTP 404 file not found.
I think the problem is in ctnsample.upload_form in the line
htp.formOpen(curl => 'cntsample.upload', cmethod => 'POST',
cenctype => 'multipart/form-data');
The ctnsample.remove work fine.
Could you,help me...There is a document in the Oracle 9iAS 1.0.2.2 Library titled "Using the PL-SQL Gateway" Part Number A90099-01.pdf that explains file upload and download through modplsql. In particular there is a section there titled "Direct BLOB Download" which explains how one can easily download a blob utilising the wpg_docload package.
I am still concerned that there exist duplicate copies of my blob content. One copy in the wwdoc_document$ table, and one in my custom table.
Dmitry/Oracle can you confirm this? -
Hi,
I'm new to jdeveloper was wondering if anyone knew of any great oracle online tutorial sites that show how to upload and retrieve documents using jedeveloper.Hi,
documents
http://download-east.oracle.com/docs/html/B25947_01/web_complex006.htm
http://technology.amis.nl/blog/?p=2297
http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/fileupload.html
you can access the SRDemo application through help--> check for updates. This application uses ADF Faces to upload documents to the middle tier server.
Frank -
Hi,
I have to upload and Download the scanned images using my Webdynpro Abap application.Please send anybody having sample app document for this.
Regards,
KumarL KHi,
Refer these online help: [FileUpload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm], [FileDownload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm].
I hope it helps.
Regards
Arjun -
How to view the report of Upload and Download list
Hello,
I would like to see the Portal Activity Report of all the users who have logged in and out and their times and I would like to see the names also with how many uploades and downloades from the portal.
I can view only the user ids thats all in the Portal Activity Report.
Can anyone help me. Please
cheers
muraliHi Murali,
KM access is not logged by the portal activity report so far.
You would have to implement it on your own. For an introduction see Documents hits count (KM Activity Reporting)
Hope it helps
Detlev -
Use WEBUTIL for upload and download file to/from Database
Dear friends
I have a table with three columns (id , name , myDoc) myDoc is a BLOB, I would like upload word documents or PDFs or images to myDoc column, I use Oracle Form 10g, I try to use webutil to solve my problem, but I couldn't, Please help me.
Thanks# Details
# transfer.database.enabled : Can be TRUE or FALSE - allows you to disable
# upload and download from the database server.
# transfer.appsrv.enabled : Can be TRUE or FALSE - allows you to disable
# upload and download from the application
# server.
# transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
# store temporary files uploaded from the client.
# If no location is specified, Application Server
# user_home/temp will be assumed.
# This location is always readable and writable
# no matter what the settings in
# transfer.appsrv.* are. This setting is
# required if you need the Client side
# READ/WRITE_IMAGE_FILE procedures.
# transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
# that uploads and downloads can only occur from
# the directories named in the
# transfer.appsrv.read.n and
# transfer.appsrv.write.n entries and their
# subdirectories. If this setting is FALSE,
# transfers can happen anywhere.
# transfer.appsrv.read.<n>: List of directory names that downloads can read
# from.
# transfer.appsrv.write.<n>: List of directory names that uploads can write
# to.
#NOTE: By default the file transfer is disabled as a security measure
transfer.database.enabled=true
transfer.appsrv.enabled=true
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=TRUE
#List transfer.appsrv.read.<n> directories
transfer.appsrv.read.1=c:\temp
#List transfer.appsrv.write.<n> directories
transfer.appsrv.write.1=c:\temp -
Problems with How-to upload and download
I downloaded and followed the instruction listed on the Oracle HTML DB How To Documents site titled - Build a file upload and download application
I completed the exercise and am having the following problems:
1) The one download link that is working gives me a popup to download a file named XXXX from www.XXX-YYY.net. The actual file I am trying to download is called stinger.exe. Www.XXX-YYY.net is the name of the site where the HTMLDB is loaded. XXXX is the name of the customer. I don't know where it is pulling the customer name from when I do the download. The correct file name is displayed in the file list. However, XXXX is the file named in the dowload pupup and an unrecognized file type call XXXX is downloaded.
(Actual names are not being used.)
2) There are two other files in the list but when I click down load for them I get The Page Cannot Be Found Error.
PriscillaThanks for responding. Lol! Seriously found this old post and decided to attempt a little bit of humor with the more recent post. Sorry did not mean to create any negative energy. Smile!!
Do you happen to know anything about APEX in the cloud. Is it out yet? -
Upload and Download of Purchase Orders - Account Assignments problem
Hi SRM Gurus,
While downloading the SRM PO into Excel format, Account Assignment is not being downloaded.
Our requirement is, To add many line items in the downloaded excel and subsequently upload to SRM. However the file structure readability is very poor even after installed Add In given by SAP. Can anyone help me in providing a solution, so that the users can be able to insert the line items and upload.
Thanks & Regards,
RamkumarHi
<u>Please read this -></u>
<b>Please see the note mentioned below.</b>
<u>
Note 734060 SRM:Upload and Download of Documents using MS Excel
Note 734946 SRM: Restriction on upload and download.</u>
<b>Alternativey, try using BBP_DOWNLOAD_BADI in SE18 Transaction.</b>
Upload PO from XML file in SRM
Upload + Download in Bid invitation
Re: Contract Upload to New System
Re: Bid download to Excel
Re: Upload new Contracts in SRM4.0
Contract Upload Scenario
Re: Upload of contracts from text file or spreadsheet
Regards
- Atul -
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
Maybe you are looking for
-
TV Show not autorized to vew on this Apple TV.
Fairly new to the Apple TV. I recently purchased an episode of a show from the iStore and then synced it with my Apple TV. When I try to watch it on the Apple TV it tells me it is not authorized to view this TV show. Is there something I am missing?
-
Application Memory Issue - Running 10.9.2
I have run my Etrecheck report and here are the results. I'm hoping someone can assist in diagnosing what 3rd party culprit is causing my issues. Hardware Information: MacBook Pro (13-inch, Mid 2012) MacBook Pro - model: MacBookPro9,2 1 2
-
How to tap non node area in a JTree
how can I trap area of a JTree which does not constitute the node rows???
-
hi all , please can you any one help me in this issue i create service and create instance when i startup it failed to start SQL> startup force; ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file 'D:\ORACLE\PR
-
Can't import photos from files and folders
Elemetns 11-- jsut bought it yesterday. Have used previosu versions for years but not on this pc. Each time I try to import, it goes thorugh some number of photos, up through 2,00 plus sometimes and then says import failed and I get nothing. It claim