How to show tiff files in sharepoint
Hello,
Ee have a bunch of scanned documents saved as tiff. How can I show them? Web app server won't preview them and this is a real big issue.
On the other hand, websio does the job, but I wouldn't like to have websio and web app server coexist.
Is there anoter solution? I'm conmortable for a web part put in viewitem.aspx that shows the tiff file underneath the metadaa.
Christos
Hi,
Below links seems to be the similar issue,
http://social.msdn.microsoft.com/Forums/en-US/339fa5d3-1f77-462f-8b04-fd5efdf77479/opening-tiff-files-inbrowser?forum=sharepointgeneralprevious
Let us know if that helped you or not.
Regards,
Purvish Shah
Similar Messages
-
How to upload 'Tiff' file in scripts
hi
how to upload 'Tiff' file in scriptsHI,
To insert logo in SAP script, follow the steps below:
/: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
These are the steps to be followed for uploading graphics in R/3 system
1. First save the file as BMP
2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and
make it Zoom as 100% and save as *.TIFF
3. Open SE38 and execute program RSTXLDMC
4. Give your TIFF file path name
5. Select Bcol (for Color)
6. TEXT ID will be ZHEX-MACRO-*.
7. Inplace of * write your own logo name (ZCOMPANYLOGO)
8. Execute the program
9. Now Goto SE71 create your ZFORM
10. Create logo window
11. Goto text element of logo window
or
In 4.6x :-
1. Goto SE71 Change the mode to GRAPHICAL
2. Choose the Graph Tabstrips
3. Now type in some name for the LOGO WINDOW
4. Press the IMPORT BUTTON and then IMPORT the BMP file from your DESKTOP
5. The code will be written automatically. You just need to drag and drop wherever you want
the graphics to be.
Regards, -
How to add js files to sharepoint page using sharepoint designer
how to add js files to sharepoint page using sharepoint designer
Upload the files to your site collection into the site assets library or into the style library, depending on perference.
Then you can include the JS files either in the master page, page tempalte or using web parts. -
Showing tiff files using web.show_document
Hello,
I want to show tiff files using web.show_document. Tiff files cannot be displayed in a browser, however therr are several plug-ins available to show them.
Can anyone recommend a plugin to display tiff files in a browser?
Kind Regards ErikWe had tried a different approach. We store all type of documents in the database using webutil.
And we dont directly open any document and we download the document to the local host and then open it using webutil client host ('local folder\file name')
This way word,excel, pdf etc will be automatically opened with its relevant appln and if there is relevant appln is not found it will prompt the windows standard Open with dialog box.
Rajesh ALex -
How to Show Clob File in Report 6I ?
Hi i want to know how to show clob file in report 6i
Regards
Shahzaib ismailIn this situation I do not use headers at all. Insted of that I use union in a query :
select 'Firstname','Salary'
from dual
union all
select firstname, to_char(salary)
from employee;
The first record will work as header
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Suneel Vishwakarma ([email protected]):
Hello,
I want to generate excel format of my report. I did it using Delimited option but it was not same as it appears in my browser if I choose html format.all the labels repeat with each instance of the row .
Can you please give me the proper Solution.How should I proceed?
Thanks & Regds.
Suneel<HR></BLOCKQUOTE>
null -
How to convert Tiff file into to JPEG....
Hi,
I want to convert a tiff file into jpeg.
Can someone please show me a simple example on how this can be done.
I want to create a Servlet that reads a blob field that contians tiff image and then convert that into to jpeg and display it in a Browser...
If anyone has any ideas if this is doable i would greatly appreciate if they can advise me on how this can be done.
Thanks in advance.Java2 Doesn't support TIFF so you'll have to rely on a 3rd party product. I suggest you look at JAI.
A solution off the top of my brain would be to use a JAI SeekableStream on the BLOB and then send the image to the client throught either a JAI image encoder, or through the default JAI.create statement.
Remember, this is just off the top of my brain. Hope it works out. -
How to show real file name on file download box when the file is downloaded
Here is my procedure for downloading from Oracle database to the client, the file is stored in a Blob field, a DAD was defined with no errors, in fact the upload works with no errors. The files are in text format, the field MIME_TYPE has the value 'text/plain' and DAD_CHARSET is ascii.
PROCEDURE download(p_filename IN VARCHAR2) IS
BEGIN
wpg_docload.download_file(p_filename);
EXCEPTION
WHEN OTHERS THEN
htp.p(sqlerrm);
RETURN;
END;
All functions are runing well, in fact it downloads with no errors but the file name that is suggested is the name of the package where the procedure es saved.
How can the real file name be showed on here? it is the parameter p_filename
I am using IE 6.0 SP 2, Oracle 10g Enterprise Edition Release 10.1.
Thanks for help
Yuri LopezI forgot something, i am using Forms [32 bits] Versión 9.0.4.0.19 and using web.show_document with a call to the procedure in the DB
-
Base64 to pdf. After conversion - how to show pdf file ?
Hello all,
I have to show and save a pdf file from internal table ion base64 format.
I mean that I receive an internal table with data in base64 that represent a pdf file. I have
to convert it into pdf file than show and save the file.
I maked a conversion by:
CALL METHOD utility->decode_base64
EXPORTING
encoded = encoded
RECEIVING
decoded = decoded.
and, now my question is :
What I have to do about the string decoded ? I have to append it somewhere ?
and, how to create a pdf file from decoded string ?
tks a lot.How to show PDF using SAPGui
Please check my reply in the following thread
a® -
Bridge CC: how to show hidden files?
My search returned hidden files.
Could you please show me how to reveal hidden files.
View | Show Hidden files IS checked.
Thanks.Open the Script Editor or AppleScript Editor in one of the subfolders of Applications and run the following:
tell application "Finder" to quit
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is "1" then
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
end if
delay 2
tell application "Finder" to run
If you change your mind later, run the script again.
(65149) -
Import window shows video thumbnails - How to show just file names ?
iMovie 10
OSX 10.10 Yosemite
Importing video from external USB HD, the import window shows thumbnails, how to configure it to show just file names ?This seems to have a lot of info.
http://homepage.mac.com/thgewecke/mlingos9.html
I got the same question marks when I used a translator on the net to make a file called hello world.txt and hello world.rtf.
doug-penningtons-Computer:~/Desktop dougpennington$ ls
Dictionary.app russian.txt ???????????? ??????.txt
Yahoo Search.app ???????????? ??????.rtf
Dictionary
russian.txt
Yahoo Search
привет мир
привет мир.txt -
How to show FTP Files in JTable, i gave codeeeee
hi to all,
plz any one can help me to show FTP Files in JTable, my FTP code is below,where i can upload and download files, i can list the files in JText Area , i want to show files in JTable, plz any on can post some code which can slove my problem
import java.net.*;
import java.io.*;
import java.util.*;
public class CFtp
static final boolean debug = false;
public static final int FTP_PORT = 21;
static int FTP_UNKNOWN = -1;
static int FTP_SUCCESS = 1;
static int FTP_TRY_AGAIN = 2;
static int FTP_ERROR = 3;
static int FTP_NOCONNECTION = 100;
static int FTP_BADUSER = 101;
static int FTP_BADPASS = 102;
public static int FILE_GET = 1;
public static int FILE_PUT = 2;
/** socket for data transfer */
private Socket dataSocket = null;
private boolean replyPending = false;
private boolean binaryMode = false;
private boolean passiveMode = false;
private boolean m_bGettingFile = false;
/** user name for login */
String user = null;
/** password for login */
String password = null;
/** last command issued */
public String command;
/** The last reply code from the ftp daemon. */
int lastReplyCode;
/** Welcome message from the server, if any. */
public String welcomeMsg;
/** Array of strings (usually 1 entry) for the last reply
from the server. */
protected Vector serverResponse = new Vector(1);
/** Socket for communicating with server. */
protected Socket serverSocket = null;
/** Stream for printing to the server. */
public PrintWriter serverOutput;
/** Buffered stream for reading replies from server. */
public InputStream serverInput;
/* String to hold the file we are up/downloading */
protected String strFileNameAndPath;
protected String m_strSource;
protected String m_strDestination;
public void setFilename( String strFile ) {
strFileNameAndPath = strFile;
String getFileName() {
return strFileNameAndPath;
public void setSourceFile(String strSourceFile) {
m_strSource = strSourceFile;
public void setDestinationFile(String strDestinationFile) {
m_strDestination = strDestinationFile;
public String getSourceFile() {
return m_strSource;
public String getDestinationFile() {
return m_strDestination;
void getCurrentDirectory() {
// return CSystem.getCurrentDir();
/** Return server connection status */
public boolean serverIsOpen() {
return serverSocket != null;
/**Set Passive mode Trasfers*/
public void setPassive(boolean mode) {
passiveMode = mode;
public int readServerResponse() throws IOException {
StringBuffer replyBuf = new StringBuffer(32);
int c;
int continuingCode = -1;
int code = -1;
String response;
try {
while (true) {
while ((c = serverInput.read()) != -1) {
if (c == '\r') {
if ((c = serverInput.read()) != '\n') {
replyBuf.append('\r');
replyBuf.append((char)c);
if (c == '\n')
break;
response = replyBuf.toString();
replyBuf.setLength(0);
try {
code = Integer.parseInt(response.substring(0, 3));
catch (NumberFormatException e) {
code = -1;
catch (StringIndexOutOfBoundsException e) {
/* this line doesn't contain a response code, so
we just completely ignore it */
continue;
serverResponse.addElement(response);
if (continuingCode != -1) {
/* we've seen a XXX- sequence */
if (code != continuingCode || (response.length() >= 4 && response.charAt(3) == '-')) {
continue;
else {
/* seen the end of code sequence */
continuingCode = -1;
break;
else if (response.length() >= 4 && response.charAt(3) == '-') {
continuingCode = code;
continue;
else {
break;
catch(Exception e) {
e.printStackTrace();
if (debug) {
// CSystem.PrintDebugMessage("readServerResponse done");
return lastReplyCode = code;
/** Sends command <i>cmd</i> to the server. */
public void sendServer(String cmd) {
if (debug) {
// CSystem.PrintDebugMessage("sendServer start");
serverOutput.println(cmd);
if (debug) {
// CSystem.PrintDebugMessage("sendServer done");
/** Returns all server response strings. */
public String getResponseString() {
String s = new String();
for(int i = 0;i < serverResponse.size();i++) {
s+=serverResponse.elementAt(i);
serverResponse = new Vector(1);
return s;
public String getResponseStringNoReset() {
String s = new String();
for(int i = 0;i < serverResponse.size();i++) {
s+=serverResponse.elementAt(i);
return s;
* issue the QUIT command to the FTP server and close the connection.
public void closeServer() throws IOException {
if (serverIsOpen()) {
issueCommand("QUIT");
if (! serverIsOpen()) {
return;
serverSocket.close();
serverSocket = null;
serverInput = null;
serverOutput = null;
protected int issueCommand(String cmd) throws IOException {
command = cmd;
int reply;
if (debug) {
// CSystem.PrintDebugMessage(cmd);
if (replyPending) {
if (debug) {
// CSystem.PrintDebugMessage("replyPending");
if (readReply() == FTP_ERROR) {
System.out.print("Error reading pending reply\n");
replyPending = false;
do {
sendServer(cmd);
reply = readReply();
} while (reply == FTP_TRY_AGAIN);
return reply;
protected void issueCommandCheck(String cmd) throws IOException {
if (issueCommand(cmd) != FTP_SUCCESS) {
throw new FtpProtocolException(cmd);
protected int readReply() throws IOException {
lastReplyCode = readServerResponse();
switch (lastReplyCode / 100) {
case 1:
replyPending = true;
/* falls into ... */
case 2://This case is for future purposes. If not properly used, it might cause an infinite loop.
//Don't add any code here , unless you know what you are doing.
case 3:
return FTP_SUCCESS;
case 5:
if (lastReplyCode == 530) {
if (user == null) {
throw new FtpLoginException("Not logged in");
return FTP_ERROR;
if (lastReplyCode == 550) {
if (!command.startsWith("PASS")) {
throw new FileNotFoundException(command);
else {
throw new FtpLoginException("Error: Wrong Password!");
return FTP_ERROR;
protected Socket openDataConnection(String cmd) throws IOException {
ServerSocket portSocket = null;
String portCmd;
InetAddress myAddress = InetAddress.getLocalHost();
byte addr[] = myAddress.getAddress();
int shift;
String ipaddress;
int port = 0;
IOException e;
if (this.passiveMode) {
// CSystem.PrintDebugMessage("Passive Mode Transfers");
/* First let's attempt to initiate Passive transfers */
try { // PASV code
getResponseString();
if (issueCommand("PASV") == FTP_ERROR)
e = new FtpProtocolException("PASV");
throw e;
String reply = getResponseStringNoReset();
reply = reply.substring(reply.indexOf("(")+1,reply.indexOf(")"));
StringTokenizer st = new StringTokenizer(reply, ",");
String[] nums = new String[6];
int i = 0;
while(st.hasMoreElements())
try
nums[i] = st.nextToken();
i++;
catch(Exception a)
a.printStackTrace();
ipaddress = nums[0]+"."+nums[1]+"."+nums[2]+"."+nums[3];
try
int firstbits = Integer.parseInt(nums[4]) << 8;
int lastbits = Integer.parseInt(nums[5]);
port = firstbits + lastbits;
catch(Exception b)
b.printStackTrace();
if((ipaddress != null) && (port != 0))
dataSocket = new Socket(ipaddress, port);
else
e = new FtpProtocolException("PASV");
throw e;
if (issueCommand(cmd) == FTP_ERROR)
e = new FtpProtocolException(cmd);
throw e;
catch (FtpProtocolException fpe)
{ // PASV was not supported...resort to PORT
portCmd = "PORT ";
/* append host addr */
for (int i = 0; i < addr.length; i++)
portCmd = portCmd + (addr[i] & 0xFF) + ",";
/* append port number */
portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
+ (portSocket.getLocalPort() & 0xff);
if (issueCommand(portCmd) == FTP_ERROR) {
e = new FtpProtocolException("PORT");
portSocket.close();
throw e;
if (issueCommand(cmd) == FTP_ERROR) {
e = new FtpProtocolException(cmd);
portSocket.close();
throw e;
dataSocket = portSocket.accept();
portSocket.close();
}//end if passive
else
{ //do a port transfer
// CSystem.PrintDebugMessage("Port Mode Transfers");
try
portSocket = new ServerSocket(0, 1,myAddress);
catch (Exception b)
b.printStackTrace();
portCmd = "PORT ";
/* append host addr */
for (int i = 0; i < addr.length; i++) {
portCmd = portCmd + (addr[i] & 0xFF) + ",";
/* append port number */
portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
+ (portSocket.getLocalPort() & 0xff);
if (issueCommand(portCmd) == FTP_ERROR) {
e = new FtpProtocolException("PORT");
portSocket.close();
throw e;
if (issueCommand(cmd) == FTP_ERROR) {
e = new FtpProtocolException(cmd);
portSocket.close();
throw e;
dataSocket = portSocket.accept();
portSocket.close();
}//end of port transfer
return dataSocket; // return the dataSocket
/** open a FTP connection to host <i>host</i>. */
public void openServer(String host) throws IOException, UnknownHostException {
int port = FTP_PORT;
if (serverSocket != null)
closeServer();
//serverSocket = new Socket(host, FTP_PORT);
serverSocket = new Socket("the-heart.com", FTP_PORT);
serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
serverInput = new BufferedInputStream(serverSocket.getInputStream());
/** open a FTP connection to host <i>host</i> on port <i>port</i>. */
public void openServer(String host, int port) throws IOException, UnknownHostException {
if (serverSocket != null)
closeServer();
serverSocket = new Socket(host, port);
//serverSocket.setSoLinger(true,30000);
serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),
true);
serverInput = new BufferedInputStream(serverSocket.getInputStream());
System.out.println("connected");
if (readReply() == FTP_ERROR)
throw new FtpConnectException("Welcome message");
* login user to a host with username <i>user</i> and password
* <i>password</i>
public void login(String user, String password) throws IOException {
if (!serverIsOpen())
throw new FtpLoginException("Error: not connected to host.\n");
this.user = user;
this.password = password;
System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
if (issueCommand("USER " + user) == FTP_ERROR)
throw new FtpLoginException("Error: User not found.\n");
if (password != null && issueCommand("PASS " + password) == FTP_ERROR)
throw new FtpLoginException("Error: Wrong Password.\n");
* login user to a host with username <i>user</i> and no password
* such as HP server which uses the form "<username>/<password>,user.<group>
public void login(String user) throws IOException
if (!serverIsOpen())
throw new FtpLoginException("not connected to host");
this.user = user;
if (issueCommand("USER " + user) == FTP_ERROR)
throw new FtpLoginException("Error: Invalid Username.\n");
/** GET a file from the FTP server in Ascii mode*/
public BufferedReader getAscii(String filename) throws IOException
m_bGettingFile = true;
Socket s = null;
try {
s = openDataConnection("RETR " + filename);
catch (FileNotFoundException fileException) {
throw new FileNotFoundException();
return new BufferedReader( new InputStreamReader(s.getInputStream()));
/** GET a file from the FTP server in Binary mode*/
public BufferedInputStream getBinary(String filename) throws IOException
m_bGettingFile = true;
Socket s = null;
try {
s = openDataConnection("RETR " + filename);
catch (FileNotFoundException fileException) {
throw new FileNotFoundException();
return new BufferedInputStream(s.getInputStream());
/** PUT a file to the FTP server in Ascii mode*/
public BufferedWriter putAscii(String filename) throws IOException
m_bGettingFile = false;
Socket s = openDataConnection("STOR " + filename);
return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
/** PUT a file to the FTP server in Binary mode*/
public BufferedOutputStream putBinary(String filename) throws IOException
m_bGettingFile = false;
Socket s = openDataConnection("STOR " + filename);
return new BufferedOutputStream(s.getOutputStream());
/** APPEND (with create) to a file to the FTP server in Ascii mode*/
public BufferedWriter appendAscii(String filename) throws IOException
m_bGettingFile = false;
Socket s = openDataConnection("APPE " + filename);
return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
/** APPEND (with create) to a file to the FTP server in Binary mode*/
public BufferedOutputStream appendBinary(String filename) throws IOException
m_bGettingFile = false;
Socket s = openDataConnection("APPE " + filename);
return new BufferedOutputStream(s.getOutputStream());
/** NLIST files on a remote FTP server */
public BufferedReader nlist() throws IOException
Socket s = openDataConnection("NLST");
return new BufferedReader( new InputStreamReader(s.getInputStream()));
/** LIST files on a remote FTP server */
public BufferedReader list() throws IOException
Socket s = openDataConnection("LIST");
return new BufferedReader( new InputStreamReader(s.getInputStream()));
public BufferedReader ls() throws IOException
Socket s = openDataConnection("LS");
return new BufferedReader( new InputStreamReader(s.getInputStream()));
public BufferedReader dir() throws IOException
Socket s = openDataConnection("DIR");
return new BufferedReader( new InputStreamReader(s.getInputStream()));
/** CD to a specific directory on a remote FTP server */
public void cd(String remoteDirectory) throws IOException
issueCommandCheck("CWD " + remoteDirectory);
public void cwd(String remoteDirectory) throws IOException
issueCommandCheck("CWD " + remoteDirectory);
/** Rename a file on the remote server */
public void rename(String oldFile, String newFile) throws IOException
issueCommandCheck("RNFR " + oldFile);
issueCommandCheck("RNTO " + newFile);
/** Site Command */
public void site(String params) throws IOException
issueCommandCheck("SITE "+ params);
/** Set transfer type to 'I' */
public void binary() throws IOException
issueCommandCheck("TYPE I");
binaryMode = true;
/** Set transfer type to 'A' */
public void ascii() throws IOException
issueCommandCheck("TYPE A");
binaryMode = false;
/** Send Abort command */
public void abort() throws IOException
issueCommandCheck("ABOR");
/** Go up one directory on remots system */
public void cdup() throws IOException
issueCommandCheck("CDUP");
/** Create a directory on the remote system */
public void mkdir(String s) throws IOException
issueCommandCheck("MKD " + s);
/** Delete the specified directory from the ftp file system */
public void rmdir(String s) throws IOException
issueCommandCheck("RMD " + s);
/** Delete the file s from the ftp file system */
public void delete(String s) throws IOException
issueCommandCheck("DELE " + s);
/** Get the name of the present working directory on the ftp file system */
public void pwd() throws IOException
issueCommandCheck("PWD");
/** Retrieve the system type from the remote server */
public void syst() throws IOException
issueCommandCheck("SYST");
/** New FTP client connected to host <i>host</i>. */
public CFtp(String host) throws IOException
openServer(host, FTP_PORT);
/** New FTP client connected to host <i>host</i>, port <i>port</i>. */
public CFtp(String host, int port) throws IOException
openServer(host, port);
public CFtp() {
// TODO Auto-generated constructor stub
public void SetFileMode(int nMode)
if (nMode == FILE_GET)
m_bGettingFile = true;
else
m_bGettingFile = false;
public static void main(String[] args){
CFtp ftp=new CFtp();
// Exception handlers
class FtpLoginException extends FtpProtocolException
FtpLoginException(String s)
super(s);
class FtpConnectException extends FtpProtocolException
FtpConnectException(String s)
super(s);
class FtpProtocolException extends IOException
FtpProtocolException(String s)
super(s);
}It's jakarta :)
The jakarta class:
/* <!-- in case someone opens this in a browser... --> <pre> */
import org.apache.commons.net.ftp.*;
import java.util.Vector;
import java.io.*;
import java.net.UnknownHostException;
/** This is a simple wrapper around the Jakarta Commons FTP
* library. I really just added a few convenience methods to the
* class to suit my needs and make my code easier to read.
* <p>
* If you want more information on the Jakarta Commons libraries
* (there is a LOT more you can do than what you see here), go to:
* http://jakarta.apache.org/commons
* <p>
* This Java class requires both the Jakarta Commons Net library
* and the Jakarta ORO library (available at http://jakarta.apache.org/oro ).
* Make sure you have both of the jar files in your path to compile.
* Both are free to use, and both are covered under the Apache license
* that you can read on the apache.org website. If you plan to use these
* libraries in your applications, please refer to the Apache license first.
* While the libraries are free, you should double-check to make sure you
* don't violate the license by using or distributing it (especially if you use it
* in a commercial application).
* <p>
* Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
* @author Julian Robichaux ( http://www.nsftools.com )
* @version 1.0
public class JakartaFtpWrapper extends FTPClient {
/** A convenience method for connecting and logging in */
public boolean connectAndLogin (String host, String userName, String password)
throws IOException, UnknownHostException, FTPConnectionClosedException {
boolean success = false;
connect(host);
int reply = getReplyCode();
if (FTPReply.isPositiveCompletion(reply))
success = login(userName, password);
if (!success)
disconnect();
return success;
/** Turn passive transfer mode on or off. If Passive mode is active, a
* PASV command to be issued and interpreted before data transfers;
* otherwise, a PORT command will be used for data transfers. If you're
* unsure which one to use, you probably want Passive mode to be on. */
public void setPassiveMode(boolean setPassive) {
if (setPassive)
enterLocalPassiveMode();
else
enterLocalActiveMode();
/** Use ASCII mode for file transfers */
public boolean ascii () throws IOException {
return setFileType(FTP.ASCII_FILE_TYPE);
/** Use Binary mode for file transfers */
public boolean binary () throws IOException {
return setFileType(FTP.BINARY_FILE_TYPE);
/** Download a file from the server, and save it to the specified local file */
public boolean downloadFile (String serverFile, String localFile)
throws IOException, FTPConnectionClosedException {
FileOutputStream out = new FileOutputStream(localFile);
boolean result = retrieveFile(serverFile, out);
out.close();
return result;
/** Upload a file to the server */
public boolean uploadFile (String localFile, String serverFile)
throws IOException, FTPConnectionClosedException {
FileInputStream in = new FileInputStream(localFile);
boolean result = storeFile(serverFile, in);
in.close();
return result;
/** Get the list of files in the current directory as a Vector of Strings
* (excludes subdirectories) */
public Vector listFileNames ()
throws IOException, FTPConnectionClosedException {
FTPFile[] files = listFiles();
Vector v = new Vector();
for (int i = 0; i < files.length; i++) {
if (!files.isDirectory())
v.addElement(files[i].getName());
return v;
/** Get the list of files in the current directory as a single Strings,
* delimited by \n (char '10') (excludes subdirectories) */
public String listFileNamesString ()
throws IOException, FTPConnectionClosedException {
return vectorToString(listFileNames(), "\n");
/** Get the list of subdirectories in the current directory as a Vector of Strings
* (excludes files) */
public Vector listSubdirNames ()
throws IOException, FTPConnectionClosedException {
FTPFile[] files = listFiles();
Vector v = new Vector();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory())
v.addElement(files[i].getName());
return v;
/** Get the list of subdirectories in the current directory as a single Strings,
* delimited by \n (char '10') (excludes files) */
public String listSubdirNamesString ()
throws IOException, FTPConnectionClosedException {
return vectorToString(listSubdirNames(), "\n");
/** Convert a Vector to a delimited String */
private String vectorToString (Vector v, String delim) {
StringBuffer sb = new StringBuffer();
String s = "";
for (int i = 0; i < v.size(); i++) {
sb.append(s).append((String)v.elementAt(i));
s = delim;
return sb.toString();
and then there is the jar file:
http://jakarta.apache.org/site/downloads/
so for the wrapper.listfiles() you have to declare the wrapper as JakartaFtpWrapper. -
How to move offline files to sharepoint with same version history
Hi,
We have downloaded some of the file from sharepoint in our computer, now we have migrated the site to 2013 from 2010.
Can we upload the offline files to new site with version history maintained.
tks,
vidhuI am not sure you can do this OOTB, either you need custom development or 3rd party tools.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
How to show the file to client
When client clicks on the button or Browse button i want to show a Open Dialog box or Window will be opend in that window i want to show the file stored on server side(in particular folder only not all files on the server) for the selection after that i want to take file name(path of the file) selected by client.
thanks ...http://forum.java.sun.com/thread.jspa?threadID=714720&messageID=4131211#4131211
http://forum.java.sun.com/thread.jspa?threadID=715965&messageID=4136873#4136873
http://forum.java.sun.com/thread.jspa?threadID=717829&messageID=4145029#4145029
http://forum.java.sun.com/thread.jspa?threadID=719743&messageID=4153427#4153427
http://forum.java.sun.com/thread.jspa?threadID=719841&messageID=4153787#4153787
Seeing your other posts it looks like you have no clue. The server and client communicate
through http and are 2 different machines (unless you are debugging). You cannot use java.io.File
in an applet because it runs on the client and you want to list files on the server.
You cannot use <input type=file to list files on the server because it lists files on the client.
As suggested before you can use java.io.File on the SERVLET/JSP to generate html code listing the
files that the client wants to see, or use a database listing location of a file and user rights to it.
And please do not post the same queston so many times, if you don't understand something place a response
to an existing thread. -
How to enable "All Files" in SharePoint Designer 2010
Hi everyone,
How can I enable "All Files" in my sharepoint designer.In home laptop I see it,but in production environment where I work,opening SharePoint Designer I can not see "All Files" button.I am with admin account and everithing is ticked in the central administration
Designer options.
Thanks in advance.Hi ,
I noticed that you said you can see the ‘All files’ folder in home laptop ,but it is missing when open in the production environment .Did this happen to
all the sites or the site in the specific web application ?Have you extend the web application into an Internet zone?
Actually you should change the SharePoint designer settings in both Central Administration and Site collection settings .Perform an IIS reset after change
the settings and reopen the site in SharePoint designer.
For more information about SharePoint designer settings ,please refer to this site :
Locking Down SharePoint Designer 2010 :
http://blogs.msdn.com/b/mcsnoiwb/archive/2010/07/01/locking-down-sharepoint-designer-2010.aspx
Thanks,
Entan Ming -
How to filter the Files from SharePoint Document Library based upon cloumn value
Hi
I should filter the files from document library. I have column called "Print Status" for the document library the value would be either "Yes" or "No".
Now i should filter out the files which has "Print Status" as a "Yes".
I am using SPFolder and SPFile from SharePoint Object Model to traverse the file in doc library.
How could i do it?
My Sample code:
foreach (SPFolder childFolder in folder.SubFolders)
if (childFolder.Name != "Forms")
AspControls.TreeNode trn = new System.Web.UI.WebControls.TreeNode(childFolder.Name, "", "~/_layouts/images/itdl.gif", childFolder.ServerRelativeUrl.ToString(), "");
newNode = TraverseFiles(childFolder, trn);
// add the new node to the tree
rootNode.ChildNodes.Add(newNode);
// loop through the files
foreach (SPFile childFile in folder.Files)
// create a new node and add to the tree
AspControls.TreeNode childNode = new System.Web.UI.WebControls.TreeNode(childFile.Name + " (" + childFile.TimeLastModified.ToShortDateString()
+ ")", Convert.ToString(childFile.Item["ID"]), "~/_layouts/images/" + childFile.IconUrl, childFile.ServerRelativeUrl.ToString(), "");
rootNode.ChildNodes.Add(childNode);
Thanks
Poomani Sankaran.Why do you transvers the file an not use a camp query? In a CAML query you can filter the print status and are able to get all files and folder objects at once.
Check out the following post: http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8c45b5e2-1fb8-435c-a97d-1d8c6d288d4c/caml-query-to-query-all-the-files-and-folders-in-document-library?forum=sharepointdevelopmentprevious
Kind regards
Stefan
http://www.n8d.at/blog
Follow me on Twitter: StFBauer |
n8design
Microsoft Community Contributor 2011 / 2012
MCTS - SharePoint / WSS Configuration and Development
Maybe you are looking for
-
i am looking for a solution to this problem so i can use itunes faster and more conveniently instead of having to completely reload all my data into itunes EVERY time i open it up.
-
Messed up characters in Firefox browser
Hey all, I've tried to Google for this answer and have come up short. If you look at this following manual that I have retouched... [URL removed at Original Poster's request] If you view it in Firefox (using the Firefox browser), notice how the chara
-
I created a document with linked images. (png and psd files). Although all pathes and filenames are the same and even when i klick on edit original files i se them in photoshop i do not see them in illustrator. even if they are on top level. any help
-
My PowerMac G3=Tons of Headaches
Hello All, I have my beloved PowerMac G3, it is a Rev.1 Heartbreaker that i've done some upgrades too. G3 400 mhz-overclocked to 450 mhz, 1 Gig of RAM, 80 Gig Hard Drive, original ATI Rage128. This is my favorite computer of all the ones that i own..
-
CVD Values Not Capturing in MIGO after Customs MIRO
Hi, I am getting problem in Import procedure. We created Import Purchase order as normal means Main Vendor in Foreign Currency and Customs Vendor in Indian Currency.We assigned same in PO. After creating PO we did Customs MIRO in Indian Currency. But