Uploading problems (Mac)
Hi,
I recently made the move to Mac and i've always uploaded to my server via dreamweaver's split view interface. Typically I'd simply select a file and drag it over to the directory that i want it uploaded to. i'm using Mac's Dreamweaver CS5 and for some reason its NOT letting me drag files over to the directory of my choosing. If i want to upload i need to right click and select "put" but it uploads it to a mirrored directory and not one of my choosing. I'm not to savy on Macs or Dreamweaver. Could someone please help?
thanks!
Here's what I do:
I create a folder, telling the client where files are. On my Mac, I have my /Sites/ folder on my Dock, so I open up the particular website subfolder in /Sites/ and then I use Apple's Finder's drag & Drop or copy function to place these .PSD and other work files into a folder in the website.
Then I tell Dreamweaver to upload the folder to the server and give my client the information on where the files may be found.
Maybe you were doing something different in Windows and not using Dreamweaver's function to move things around, but you thought you were. Placing work files in a folder on a site works just fine. I do it in my local folder with the Apple Finder and then I just have Dreamweaver upload that folder, using Put.
Similar Messages
-
I have read through the discussions and see that a lot of people are having an uploading problem. I am too, but my problem is a little different. When I upload my photos, everything seems to be fine, all the pages turn from blue to red, and it appears to be done. But, if I quit iWeb, it says it hasn't finished uploading. When I go to the site on the web, everything is there. So, it seems to not be finalizing the last little part where it marks the files as uploaded.
I am using iWeb 1.1.1.
I have tried deleting the files from my iDisk and uploading again.
I have repaired permissions.
I have deleted the file com.apple.iWeb.plist
It's not that I'm trying to quit too soon, I have left it for hours, even overnight, and it doesn't complete.
There's a small circle to the right of the word site that fills in to show progress as it's finishing, and that gets to the point where there's only a small sliver of white.
Any ideas? Thanks for the help!
Kirsten
MacBook Mac OS X (10.4.7)Have you tried "Publish ALL to .Mac"?
-
Upload to .Mac constantly interrupted!
I have created 7 Sites with 1 to 14 pages per site. Everytime I try to upload to .Mac I get an error message "... problem while uploading file xxxx ...". So, only part of my web site is uploaded. The interruption happens always at a different stage through the upload process, so it can't be related to a certain file.
Anyone who has the same problems?Uploads connection speeds are nothing like your download speed and every ISP is different.
Even a very fast cable Internet connection is (at best) one third of your download speed. Other ISP's like DSL sometimes place restrictions on your upload bandwidth. Dial-up? Forgetaboutit.
Solutions?
Publish your pages in smaller batches. Once your "big files" (movies, podcasts or music) are published as pages iWeb needs to only modify the html code in some previously published pages.
You can add a little bit at a time to your Site. Once you've got the large pages uploaded (one at a time if needed) you can continue to add to your Site and even adjust the page order.
Uploading data is like trying to suck a potato through a straw. It works better if you cut up the potato. Even better still if the potato is "mashed" (properly compressed). -
Need a fix for Muse upload problems to GoDaddy???? I found one!
GoDaddy now has a new cpanel named "Plesk". In that panel you will find File Manager. (I use the Windows version). In the left panel of File Manager, you will see the root directory and all of its subfolders. When you click on any of these folders, you will see their contents in the right panel. You will also see a folder labelled "httpdocs". This is the default folder that is set up in GoDaddy to be your "home" folder. So, to fix your upload problems, do these steps:
1. Click on the httpdocs folder to see it open in the right panel. In the toolbar above the right panel, you will see a green plus sign with the word "New". Click on this drop-down menu.
2. Choose "directory"
3. Type in the name of one of the folders that your site will need, e.g. images, css, assets, scripts, etc. This basically creates a subfolder within the httpdocs folder, right? (There is a way to see how your Muse site sets up these folders prior to publish or upload. You do this by choosing "Export as HTML" in the File menu of Muse, creating a folder on your desktop (or wherever) for the HTML export, then inspecting its contents after your save it.)
4. Continue to create all the subfolders within httpdocs that you will need. Unfortunately, you have to do this one folder at a time.
5. After you have them set up, begin the process of uploading your site, like this:
6. In the File menu in Muse, you'll of course see "Upload to FTP Host ...". Click on it.
7. A dialog box will open. In the top text field, type in your website name ... you must use www. with your entry
8. In the "FTP Host" field, type in your domain name again like this ... "ftp.yourdomain.com" ... NO FORWARD SLASHES!!! (even if you find instructions to the contrary, like in Filezilla) (Also, your domain might be a .org or .net, instead of a .com)
9. In the "Host directory" field, YOU MUST ENTER "httpdocs"!!!! Despite what you learn, DO NOT LEAVE THIS FIELD BLANK!!!
10. Then enter your GoDaddy username and password. (If you set up a different username for your GoDaddy account and your Plesk account, like I did, then use your Plesk username and password.)
11. Click on "Upload: All Files"
The next few steps are tedious, but necessary to keep your site organized on GoDaddy and to keep from confusing things. You can probably get away with it, but, if your site doesn't load properly in a browser after doing the above steps, you'll need to click on each folder in the root directory that you copied as a subfolder in the "httpdocs" folder and delete the files. For example, in the left panel of File Manager, you'll see the root directory. Click on the "images" folder. If there are any images that you need for your site in that folder, delete them. Remember ... you've already copied them over to the images subfolder in httpdocs during your last upload described in the instructions above. If you don't trust that you can delete them, click on the "httpdocs" folder, then click on the "images" folder and check the files. Same files, right? So, go ahead and delete the site files that you find in the appropriate folders in the root directory, making sure that you don't delete the ones that are NOT duplicated within the "httpdocs" folder. Also remember that your .html pages will not require a subfolder to be set up in the "httpsdocs" folder. They can just sit there, looking pretty. But you will have to delete them from the root directory to keep things tidy. Just click on the folder icon next to "root directory", and you'll see those html pages in the right panel. Again, delete them.
REMEMBER: To keep your Muse uploads to your GoDaddy site error free, you must ALWAYS make sure that "httpdocs" appears in the "Host directory" field in the "Upload to FTP Host ..." dialog box in Muse. And all files and folders that your site needs MUST go in the "httpdocs" folder in the root directory of your site in GoDaddy's File Manager (now found in your Plesk Panel).
I hope this wasn't too confusing. If so, call GoDaddy. I called them with this fix and they are using it in their phone support.Thank you! Thank you! Thank you! I was going out of my mind. And GoDaddy was no help (although they're usually really good.) I put all the folders in "httpdocs" and the website worked perfectly!
-
AIR(Desktop) -Upload in MAC app store
Please help me to upload air(desktop) application into MAC- App store.
I can create .app file and .dmg with native instalers (with won created .p12 with flashbuilder).
And i have apple developer .p12 certificate. (I have apple developer ID)
I got this error while packing when using created .p12 certificate with my Apple Developer account.
Please help me.! I need to upload my (.air application for MAC) upload in MAC App store.
Please give me as step by step method as if u can.
Thank you all..!
Note: I can upload iPhone, iPod and iPad Applications in appstore.
But, I need to upload MAC app store.
I tried:
http://pigsels.com/2012/04/air-app-store-publishing-guide/
http://forums.adobe.com/message/1975832#1975832I tried this
http://forums.adobe.com/message/1975832#1975832 -
Uploading problem with Ebay and Dreamweaver MX
I am unable to sync websites with Dreamweaver MX 6.01. When I connect to the remote server, it shuts down the program. I have reinstalled the program, but it still does it. Also, when I use Safari, Opera, and Firefox to upload photos on Ebay, the upload process fails completely, and blows me directly into My Ebay, as if I was not on the selling page at all. I have to go to my PC to do the photo uploads. Seems like it may be a related issue, some kind of uploading problem with Rosetta, or something. I am using a Macbook Pro with the 2.0Ghz processor, connected with ethernet cable, and firewall is set to off. Any ideas?
For E-Bay you might try the following:
Type the following command in Terminal (while Safari is NOT running):
defaults write com.apple.Safari IncludeDebugMenu 1
Then launch Safari, and you will be able to use the new Debug menu.
If you ever wish to disable it again, just repeat the command with a "0" instead of a "1".
Under the Debug menu, you'll see the User Agent sub-menu; select Windows MSIE 6.0 from the list and then try connecting to your web site
Dreamweaver you might need to update your version.
To Dreamweaver 8.01
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=f56452a8 -
Software update can't check for updates because of a network problem mac
hi i am facing below probelm on my mac ... i have done all the ip setting on my mac Error is software update can't check for updates because of a network problem mac.Can any one please assit me...
Can Some solve my problem.....
-
Uploading problems with Safari 4.1.3 -
Hello, I just thought this was a funny question to ask -
On my PowerPC G5 tower, running OS 10.4.11, and my question is in regards to Safari version 4.1.3 uploading problems for facebook and youtube... I always have to use FireFox version 3.6.13... and not without trouble either.
I get it. I need a new computer, but I just thought it fascinating why one works 90% of the time and the other never works.Firefox is way more upto date than Safari in 10.4.11, but TenFourFox is the most up to date browser for our PPCs, they even have G4 & G5 optimized versions...
http://www.floodgap.com/software/tenfourfox/
Also I think they Require Flash &/or Java, which may be a problem in 10.4 -
Is Safari the problem? upload problems after Leopard install...
I installed maximum ram and leopard 10.5 on my old emac and it runs great. I had problems uploading photos to ebay, and attachments to emails, so I installed ilife hoping the upgrade would fix the problem. Nope, when I attempt to upload, the icon just spins and spins, on and on. Could this be a Safari problem? Very frustrated, totally stumped.
I'm not sure how to link to the iPhoto post thread that help me solve my upload problem. But it is solved. I had to resize the jpeg pic files to 640x320 because my files were way to big. Thanks Old Toad!
-
Installed Snow Leopard OK, but when uploading the Mac OS X Update Combined, it would not save. It said it could not connect to update server, but my internet connection is working. Any suggestions on fixing?
Run software up date, write down the update name and version. Go to the Apple site and do a search for the updates one at a time and download them one at a time. Use an ethernet connection, sometimes software update "crushes large updates. I have experienced this before. Hope it helps. ATB
-
Expose Photo Gallery: Uploading Problems Using Mac
Hello All,
First post, sorry to say it's about a problem I'm having. I have a Joomla based website and I'm using the Expose Flash Gallery as an image gallery solution on my photography site: http://www.wakinglifephoto.com/
The plugin works great on the front end, my problem only occurs when managing albums on the backend, which is also based on Adobe's Flash Player.
Whenever I try to upload a photo on my Mac, the process stalls and never completes. If I'm using a Windows PC, everything uploads fine. I've talked with the people who make this gallery plugin and they say it has to do with a bug that is only found in the Mac version of Flash Player.
Is there any type of solution available for this problem, or do I have to wait and hope that it gets fixed in Flash 10.1?
TIA.The Fascinate has SD card capability, so I would save all my photos to a micro SD card, and then use a reader to transfer them to your computer.
-
Hi everybody,
My connection works fine. BUT i can't send any e-mail with big attachments, i can't access to certain site (www.voyage-sncf.fr for example firefox block when i try to send a formular to tell my destination) , i can't use my webcam ... I use DHCP and an Ethernet cable to connect internet and i don't use proxy. What can I do ? this problem appears from nowhere and my ISP said it comes from an incompatibility between my OS version and the modem but i think i didn't upgrade my OS recently.
HELP ME thank youHi,
i found the problem, it was in fact not the DataEvent. I used to check which FileReference.type is used, for mac this is in most cases "null" and instead of showing the problem it just did "nothing". So the problem i described is not existent.
Thanks -
Hi I am using a ftp class (known as FTPConnection) that i found on this site: http://www.nsftools.com/tips/JavaFtp.htm , and they only have an example of how to download a File through FTP and not upload one. I am in the proccess of making an FTP upload applet, and need some help on getting upload to work. I also need it to work on both a Pc and mac, so that may be attributing to the problem becuase i am currently on a mac which uses file:// instead of C:\\. Ill post the ftp class, and a snippet of my code that tries to upload a selected file.
FTPConnection
/* <!-- in case someone opens this in a browser... --> <pre> */
* File: FTPConnection.java
* Author: Bret Taylor <[email protected]>
* URL: http://www.stanford.edu/~bstaylor/cs/ftpconnection/FTPConnection.java.shtml
* see also <a href="http://www.nsftools.com/tips/JavaFtp.htm">http://www.nsftools.com/tips/JavaFtp.htm</a>
* $Id$
* Parts of this code were adopted from a variety of other FTP classes the
* author has encountered that he was not completely satisfied with. If you
* think more thanks are due to any particular author than is given, please
* let him know. With that caveat, this class can be freely distributed and
* modified as long as Bret Taylor is given credit in the source code comments.
* Modified by Julian Robichaux -- http://www.nsftools.com
* Added constructors, logout(), listFiles(), listSubdirectories(), getAndParseDirList(),
* processFileListCommand(), and overloaded getFullServerReply().
* Also added StringBuffer parameter options to transferData() and executeDataCommand()
* and did a few other little things.
import java.io.*;
import java.net.*;
import java.util.*;
* <p>A wrapper for the network and command protocols needed for the most common
* FTP commands. Standard usage looks something like this:</p>
* <pre> FTPConnection connection = new FTPConnection();
* try {
* if (connection.connect(host)) {
* if (connection.login(username, password)) {
* connection.downloadFile(serverFileName);
* connection.uploadFile(localFileName);
* connection.disconnect();
* } catch (UnknownHostException e) {
* // handle unknown host
* } catch (IOException e) {
* // handle I/O exception
* }</pre>
* <p>Most FTP commands are wrapped by easy-to-use methods, but in case clients
* need more flexibility, you can execute commands directly using the methods
* <a href="#executeCommand(java.lang.String)">executeCommand</a> and
* <a href="#executeDataCommand(java.lang.String,
* java.io.OutputStream)">executeDataCommand</a>,
* the latter of which is used for commands that require an open data port.</p>
* @author Bret Taylor
* @author Julian Robichaux
* @version 1.01
public class FTPConnection extends Object {
* If this flag is on, we print out debugging information to stdout during
* execution. Useful for debugging the FTP class and seeing the server's
* responses directly.
private static boolean PRINT_DEBUG_INFO = false;
* The socket through which we are connected to the FTP server.
private Socket connectionSocket = null;
private String username;
private String password;
private String host;
* The socket output stream.
private PrintStream outputStream = null;
* The socket input stream.
private BufferedReader inputStream = null;
* The offset at which we resume a file transfer.
private long restartPoint = 0L;
* Added by Julian: If this flag is on, we're currently logged in to something.
private boolean loggedIn = false;
* Added by Julian: This is the line terminator to use for multi-line responses.
public String lineTerm = "\n";
* Added by Julian: This is the size of the data blocks we use for transferring
* files.
private static int BLOCK_SIZE = 4096;
* Added by Julian: After you create an FTPConnection object, you will call the
* connect() and login() methods to access your server. Please don't forget to
* logout() and disconnect() when you're done (it's only polite...).
public FTPConnection ()
// default constructor (obviously) -- this is just good to have...
* Added by Julian: Allows you to specify if you want to send debug output to
* the console (true if you do, false if you don't).
public FTPConnection (boolean debugOut)
PRINT_DEBUG_INFO = debugOut;
public FTPConnection (String user, String pw, String host_)
username=user;
password=pw;
host=host_;
PRINT_DEBUG_INFO = false;
* Prints debugging information to stdout if the private flag
* <code>PRINT_DEBUG_INFO</code> is turned on.
private void debugPrint(String message) {
if (PRINT_DEBUG_INFO) System.err.println(message);
* Connects to the given FTP host on port f, the default FTP port.
public boolean connect(String host)
throws UnknownHostException, IOException
return connect(host, 21);
* Connects to the given FTP host on the given port.
public boolean connect(String host, int port)
throws UnknownHostException, IOException
connectionSocket = new Socket(host, port);
connectionSocket.setSoTimeout(10000);
outputStream = new PrintStream(connectionSocket.getOutputStream());
inputStream = new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
if (!isPositiveCompleteResponse(getServerReply())){
disconnect();
return false;
return true;
* Disconnects from the host to which we are currently connected.
static boolean URLexists(String URLName)
try
HttpURLConnection.setFollowRedirects(false);
// note : you may also need
// HttpURLConnection.setInstanceFollowRedirects(false)
HttpURLConnection con =
(HttpURLConnection) new URL(URLName).openConnection();
con.setRequestMethod("HEAD");
return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
catch (Exception e)
e.printStackTrace();
return false;
public String getSimpleFileName(File f)
String path=f.getPath();
String fileName=path.replace("\\", "/");
int slashPos = fileName.lastIndexOf("/");
fileName=fileName.substring(slashPos+1);
return fileName;
public String verifyFileName(String name)
int count=0;
//String url="http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20");
while (URLexists("http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20"))==true)
count++;
name=FileExt(name)[0]+"-"+count+"."+FileExt(name)[1];
return name;
public String[] FileExt(String fileName)
int dotPos = fileName.lastIndexOf(".");
fileName=fileName.replace("\\", "/");
int slashPos = fileName.lastIndexOf("/");
String extension, name;
if (slashPos==fileName.length()-1)
fileName=fileName.substring(0, fileName.length()-1);
slashPos=fileName.lastIndexOf("/");
extension="/";
name=fileName.substring(slashPos+1);
else if(dotPos==-1)
name=fileName.substring(slashPos+1);
extension="";
else
extension = fileName.substring(dotPos+1);
name=fileName.substring(slashPos+1, dotPos);
String[] output={name, extension};
return output;
String[] output={name, extension};
return output;
public void disconnect()
if (outputStream != null) {
try {
if (loggedIn) { logout(); };
outputStream.close();
inputStream.close();
connectionSocket.close();
} catch (IOException e) {}
outputStream = null;
inputStream = null;
connectionSocket = null;
* Wrapper for the commands <code>user [username]</code> and <code>pass
* [password]</code>.
public boolean login(String username, String password)
throws IOException
int response = executeCommand("user " + username);
if (!isPositiveIntermediateResponse(response)) return false;
response = executeCommand("pass " + password);
loggedIn = isPositiveCompleteResponse(response);
return loggedIn;
* Added by Julian: Logout before you disconnect (this is good form).
public boolean logout()
throws IOException
int response = executeCommand("quit");
loggedIn = !isPositiveCompleteResponse(response);
return !loggedIn;
* Wrapper for the command <code>cwd [directory]</code>.
public boolean changeDirectory(String directory)
throws IOException
int response = executeCommand("cwd " + directory);
return isPositiveCompleteResponse(response);
* Wrapper for the commands <code>rnfr [oldName]</code> and <code>rnto
* [newName]</code>.
public boolean renameFile(String oldName, String newName)
throws IOException
int response = executeCommand("rnfr " + oldName);
if (!isPositiveIntermediateResponse(response)) return false;
response = executeCommand("rnto " + newName);
return isPositiveCompleteResponse(response);
* Wrapper for the command <code>mkd [directory]</code>.
public boolean makeDirectory(String directory)
throws IOException
int response = executeCommand("mkd " + directory);
return isPositiveCompleteResponse(response);
* Wrapper for the command <code>rmd [directory]</code>.
public boolean removeDirectory(String directory)
throws IOException
int response = executeCommand("rmd " + directory);
return isPositiveCompleteResponse(response);
* Wrapper for the command <code>cdup</code>.
public boolean parentDirectory()
throws IOException
int response = executeCommand("cdup");
return isPositiveCompleteResponse(response);
* Wrapper for the command <code>dele [fileName]</code>.
public boolean deleteFile(String fileName)
throws IOException
int response = executeCommand("dele " + fileName);
return isPositiveCompleteResponse(response);
* Wrapper for the command <code>pwd</code>.
public String getCurrentDirectory()
throws IOException
String response = getExecutionResponse("pwd");
StringTokenizer strtok = new StringTokenizer(response);
// Get rid of the first token, which is the return code
if (strtok.countTokens() < 2) return null;
strtok.nextToken();
String directoryName = strtok.nextToken();
// Most servers surround the directory name with quotation marks
int strlen = directoryName.length();
if (strlen == 0) return null;
if (directoryName.charAt(0) == '\"') {
directoryName = directoryName.substring(1);
strlen--;
if (directoryName.charAt(strlen - 1) == '\"')
return directoryName.substring(0, strlen - 1);
return directoryName;
* Wrapper for the command <code>syst</code>.
public String getSystemType()
throws IOException
return excludeCode(getExecutionResponse("syst"));
* Wrapper for the command <code>mdtm [fileName]</code>. If the file does
* not exist, we return -1;
public long getModificationTime(String fileName)
throws IOException
String response = excludeCode(getExecutionResponse("mdtm " + fileName));
try {
return Long.parseLong(response);
} catch (Exception e) {
return -1L;
* Wrapper for the command <code>size [fileName]</code>. If the file does
* not exist, we return -1;
public long getFileSize(String fileName)
throws IOException
String response = excludeCode(getExecutionResponse("size " + fileName));
try {
return Long.parseLong(response);
} catch (Exception e) {
return -1L;
* Wrapper for the command <code>retr [fileName]</code>.
public boolean downloadFile(String fileName)
throws IOException
return readDataToFile("retr " + fileName, fileName);
* Wrapper for the command <code>retr [serverPath]</code>. The local file
* path to which we will write is given by <code>localPath</code>.
public boolean downloadFile(String serverPath, String localPath)
throws IOException
return readDataToFile("retr " + serverPath, localPath);
* Wrapper for the command <code>stor [fileName]</code>.
public boolean uploadFile(String fileName)
throws IOException
return writeDataFromFile("stor " + fileName, fileName);
* Wrapper for the command <code>stor [localPath]</code>. The server file
* path to which we will write is given by <code>serverPath</code>.
public boolean uploadFile(String serverPath, String localPath)
throws IOException
return writeDataFromFile("stor " + serverPath, localPath);
* Set the restart point for the next download or upload operation. This
* lets clients resume interrupted uploads or downloads.
public void setRestartPoint(int point)
restartPoint = point;
debugPrint("Restart noted");
* Gets server reply code from the control port after an ftp command has
* been executed. It knows the last line of the response because it begins
* with a 3 digit number and a space, (a dash instead of a space would be a
* continuation).
private int getServerReply()
throws IOException
return Integer.parseInt(getFullServerReply().substring(0, 3));
* Gets server reply string from the control port after an ftp command has
* been executed. This consists only of the last line of the response,
* and only the part after the response code.
private String getFullServerReply()
throws IOException
String reply;
do {
reply = inputStream.readLine();
debugPrint(reply);
} while(!(Character.isDigit(reply.charAt(0)) &&
Character.isDigit(reply.charAt(1)) &&
Character.isDigit(reply.charAt(2)) &&
reply.charAt(3) == ' '));
return reply;
* Added by Julian: Returns the last line of the server reply, but also
* returns the full multi-line reply in a StringBuffer parameter.
private String getFullServerReply(StringBuffer fullReply)
throws IOException
String reply;
fullReply.setLength(0);
do {
reply = inputStream.readLine();
debugPrint(reply);
fullReply.append(reply + lineTerm);
} while(!(Character.isDigit(reply.charAt(0)) &&
Character.isDigit(reply.charAt(1)) &&
Character.isDigit(reply.charAt(2)) &&
reply.charAt(3) == ' '));
// remove any trailing line terminators from the fullReply
if (fullReply.length() > 0)
fullReply.setLength(fullReply.length() - lineTerm.length());
return reply;
* Added by Julian: Gets a list of files in the current directory.
public String listFiles()
throws IOException
return listFiles("");
* Added by Julian: Gets a list of files in either the current
* directory, or one specified as a parameter. The 'params' parameter
* can be either a directory name, a file mask, or both (such as
* '/DirName/*.txt').
public String listFiles(String params)
throws IOException
StringBuffer files = new StringBuffer();
StringBuffer dirs = new StringBuffer();
if (!getAndParseDirList(params, files, dirs))
debugPrint("Error getting file list");
return files.toString();
* Added by Julian: Gets a list of subdirectories in the current directory.
public String listSubdirectories()
throws IOException
return listSubdirectories("");
* Added by Julian: Gets a list of subdirectories in either the current
* directory, or one specified as a parameter. The 'params' parameter
* can be either a directory name, a name mask, or both (such as
* '/DirName/Sub*').
public String listSubdirectories(String params)
throws IOException
StringBuffer files = new StringBuffer();
StringBuffer dirs = new StringBuffer();
if (!getAndParseDirList(params, files, dirs))
debugPrint("Error getting dir list");
return dirs.toString();
* Added by Julian: Sends and gets the results of a file list command,
* like LIST or NLST.
private String processFileListCommand(String command)
throws IOException
StringBuffer reply = new StringBuffer();
String replyString;
// file listings require you to issue a PORT command,
// like a file transfer
boolean success = executeDataCommand(command, reply);
if (!success)
return "";
replyString = reply.toString();
// strip the trailing line terminator from the reply
if (reply.length() > 0)
return replyString.substring(0, reply.length() - 1);
} else {
return replyString;
* Added by Julian: Gets a directory list from the server and parses
* the elements into a list of files and a list of subdirectories.
private boolean getAndParseDirList(String params, StringBuffer files, StringBuffer dirs)
throws IOException
// reset the return variables (we're using StringBuffers instead of
// Strings because you can't change a String value and pass it back
// to the calling routine -- changing a String creates a new object)
files.setLength(0);
dirs.setLength(0);
// get the NLST and the LIST -- don't worry if the commands
// don't work, because we'll just end up sending nothing back
// if that's the case
String shortList = processFileListCommand("nlst " + params);
String longList = processFileListCommand("list " + params);
// tokenize the lists we got, using a newline as a separator
StringTokenizer sList = new StringTokenizer(shortList, "\n");
StringTokenizer lList = new StringTokenizer(longList, "\n");
// other variables we'll need
String sString;
String lString;
// assume that both lists have the same number of elements
while ((sList.hasMoreTokens()) && (lList.hasMoreTokens())) {
sString = sList.nextToken();
lString = lList.nextToken();
if (lString.length() > 0)
if (lString.startsWith("d"))
dirs.append(sString.trim() + lineTerm);
debugPrint("Dir: " + sString);
} else if (lString.startsWith("-")) {
files.append(sString.trim() + lineTerm);
debugPrint("File: " + sString);
} else {
// actually, symbolic links will start with an "l"
// (lowercase L), but we're not going to mess with
// those
debugPrint("Unknown: " + lString);
// strip off any trailing line terminators and return the values
if (files.length() > 0) { files.setLength(files.length() - lineTerm.length()); }
if (dirs.length() > 0) { dirs.setLength(dirs.length() - lineTerm.length()); }
return true;
* Executes the given FTP command on our current connection, returning the
* three digit response code from the server. This method only works for
* commands that do not require an additional data port.
public int executeCommand(String command)
throws IOException
outputStream.println(command);
return getServerReply();
* Executes the given FTP command on our current connection, returning the
* last line of the server's response. Useful for commands that return
* one line of information.
public String getExecutionResponse(String command)
throws IOException
outputStream.println(command);
return getFullServerReply();
* Executes the given ftpd command on the server and writes the results
* returned on the data port to the file with the given name, returning true
* if the server indicates that the operation was successful.
public boolean readDataToFile(String command, String fileName)
throws IOException
// Open the local file
RandomAccessFile outfile = new RandomAccessFile(fileName, "rw");
// Do restart if desired
if (restartPoint != 0) {
debugPrint("Seeking to " + restartPoint);
outfile.seek(restartPoint);
// Convert the RandomAccessFile to an OutputStream
FileOutputStream fileStream = new FileOutputStream(outfile.getFD());
boolean success = executeDataCommand(command, fileStream);
outfile.close();
return success;
* Executes the given ftpd command on the server and writes the contents
* of the given file to the server on an opened data port, returning true
* if the server indicates that the operation was successful.
public boolean writeDataFromFile(String command, String fileName)
throws IOException
// Open the local file
RandomAccessFile infile = new RandomAccessFile(fileName, "r");
// Do restart if desired
if (restartPoint != 0) {
debugPrint("Seeking to " + restartPoint);
infile.seek(restartPoint);
// Convert the RandomAccessFile to an InputStream
FileInputStream fileStream = new FileInputStream(infile.getFD());
boolean success = executeDataCommand(command, fileStream);
infile.close();
return success;
* Executes the given ftpd command on the server and writes the results
* returned on the data port to the given OutputStream, returning true
* if the server indicates that the operation was successful.
public boolean executeDataCommand(String command, OutputStream out)
throws IOException
// Open a data socket on this computer
ServerSocket serverSocket = new ServerSocket(0);
if (!setupDataPort(command, serverSocket)) return false;
Socket clientSocket = serverSocket.accept();
// Transfer the data
InputStream in = clientSocket.getInputStream();
transferData(in, out);
// Clean up the data structures
in.close();
clientSocket.close();
serverSocket.close();
return isPositiveCompleteResponse(getServerReply());
* Executes the given ftpd command on the server and writes the contents
* of the given InputStream to the server on an opened data port, returning
* true if the server indicates that the operation was successful.
public boolean executeDataCommand(String command, InputStream in)
throws IOException
// Open a data socket on this computer
ServerSocket serverSocket = new ServerSocket(0);
if (!setupDataPort(command, serverSocket)) return false;
Socket clientSocket = serverSocket.accept();
// Transfer the data
OutputStream out = clientSocket.getOutputStream();
transferData(in, out);
// Clean up the data structures
out.close();
clientSocket.close();
serverSocket.close();
return isPositiveCompleteResponse(getServerReply());
* Added by Julian: Executes the given ftpd command on the server
* and writes the results returned on the data port to the given
* StringBuffer, returning true if the server indicates that the
* operation was successful.
public boolean executeDataCommand(String command, StringBuffer sb)
throws IOException
// Open a data socket on this computer
ServerSocket serverSocket = new ServerSocket(0);
if (!setupDataPort(command, serverSocket)) return false;
Socket clientSocket = serverSocket.accept();
// Transfer the data
InputStream in = clientSocket.getInputStream();
transferData(in, sb);
// Clean up the data structures
in.close();
clientSocket.close();
serverSocket.close();
return isPositiveCompleteResponse(getServerReply());
* Transfers the data from the given input stream to the given output
* stream until we reach the end of the stream.
private void transferData(InputStream in, OutputStream out)
throws IOException
byte b[] = new byte[BLOCK_SIZE];
int amount;
// Read the data into the file
while ((amount = in.read(b)) > 0) {
out.write(b, 0, amount);
* Added by Julian: Transfers the data from the given input stream
* to the given StringBuffer until we reach the end of the stream.
private void transferData(InputStream in, StringBuffer sb)
throws IOException
byte b[] = new byte[BLOCK_SIZE];
int amount;
// Read the data into the StringBuffer
while ((amount = in.read(b)) > 0) {
sb.append(new String(b, 0, amount));
* Executes the given ftpd command on the server and writes the results
* returned on the data port to the given FilterOutputStream, returning true
* if the server indicates that the operation was successful.
private boolean setupDataPort(String command, ServerSocket serverSocket)
throws IOException
// Send our local data port to the server
if (!openPort(serverSocket)) return false;
// Set binary type transfer
outputStream.println("type i");
if (!isPositiveCompleteResponse(getServerReply())) {
debugPrint("Could not set transfer type");
return false;
// If we have a restart point, send that information
if (restartPoint != 0) {
outputStream.println("rest " + restartPoint);
restartPoint = 0;
// TODO: Interpret server response here
getServerReply();
// Send the command
outputStream.println(command);
return isPositivePreliminaryResponse(getServerReply());
* Get IP address and port number from serverSocket and send them via the
* <code>port</code> command to the ftp server, returning true if we get a
* valid response from the server, returning true if the server indicates
* that the operation was successful.
private boolean openPort(ServerSocket serverSocket)
throws IOException
int localport = serverSocket.getLocalPort();
// get local ip address
InetAddress inetaddress = serverSocket.getInetAddress();
InetAddress localip;
try {
localip = inetaddress.getLocalHost();
} catch(UnknownHostException e) {
debugPrint("Can't get local host");
return false;
// get ip address in high byte order
byte[] addrbytes = localip.getAddress();
// tell server what port we are listening on
short addrshorts[] = new short[4];
// problem: bytes greater than 127 are printed as negative numbers
for(int i = 0; i <= 3; i++) {
addrshorts[i] = addrbytes;
if (addrshorts[i] < 0)
addrshorts[i] += 256;
outputStream.println("port " + addrshorts[0] + "," + addrshorts[1] +
"," + addrshorts[2] + "," + addrshorts[3] + "," +
((localport & 0xff00) >> 8) + "," +
(localport & 0x00ff));
return isPositiveCompleteResponse(getServerReply());
* True if the given response code is in the 100-199 range.
private boolean isPositivePreliminaryResponse(int response)
return (response >= 100 && response < 200);
* True if the given response code is in the 300-399 range.
private boolean isPositiveIntermediateResponse(int response)
return (response >= 300 && response < 400);
* True if the given response code is in the 200-299 range.
private boolean isPositiveCompleteResponse(int response)
return (response >= 200 && response < 300);
* True if the given response code is in the 400-499 range.
private boolean isTransientNegativeResponse(int response)
return (response >= 400 && response < 500);
* True if the given response code is in the 500-5ok i tried explaining th eproblem in the previous post, but i apologize if my explanation was poor. anyways, i tried to look into it further by doing a printStackTrace() and believe it may be a read error. here is my new updated snippet, and also a link to a screenshot ([click here for screenshot|http://img143.imageshack.us/my.php?image=picture4qr0.png]) of what the error looks like on my end. it seems like a socket is not being read, or maybe it is initialized properly. Again I apologize if my problem is vague, but I do appreciate your input. thanks.
updated code snippet
public void uploadFiles()
statusLabel.setVisible(true);
errorLabel.setVisible(true);
uploadButton.setVisible(false);
footer.setVisible(false);
holdingPanel.setVisible(false);
pbar.setVisible(true);
pbar = new JProgressBar();
pbar.setMinimum(0);
float Total=0;
for (int i=0; i<fileLengths.size(); i++)
if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
Total+=Float.parseFloat((String)fileLengths.get(i));
pbar.setMaximum((int)Total);
String info="";
try
ftp=new FTPConnection(false);
ftp.connect("ftp.chris-malcolm.com");
if (ftp.login("chrismal", "***"))
statusLabel.setText("Status: Connected.");
info+="Successfully logged in!\n";
info+="System type is: " + ftp.getSystemType()+"\n";
info+="Current directory is: " + ftp.getCurrentDirectory()+"\n";
if (ftp.changeDirectory("/www/images/"))
info+="directory changed to: " + ftp.getCurrentDirectory()+"\n";
try
for (int i=0; i<allFiles.size(); i++)
if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
String f=client.verifyFileName((String)model.getValueAt(i,0));
String f2=""+((File)allFiles.get(i)).getPath();
info+="filename: "+f2+"\n";
if (ftp.uploadFile(f2))
statusLabel.setText("Status: Uploading "+f+" - "+i+" of "+calculateTotalFiles()+" files(s)");
pbar.setValue(Integer.parseInt((String)fileLengths.get(i)));
else
errorLabel.setText("Error occured while uploading"+f2+"\n");
catch(Exception de)
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
de.printStackTrace(pw);
pw.close();
//errorLabel.setText("<html>ERROR:"+sw.toString().replace("\n", "<br>")+"</html>");
info+="Error: "+de.getMessage()+"\n";
info+="Trace: "+sw+"\n";
try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");} catch(Exception e2) {};
else
info+="could not change directory\n";
else
info+="could not login";
catch (Exception e)
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.close();
info+="Error: "+e.getMessage()+"\n";
info+="Trace: "+sw+"\n";
try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");} catch(Exception e2) {};
errorLabel.setText("ERROR:"+info);
JOptionPane.showMessageDialog(this, info, "test", JOptionPane.PLAIN_MESSAGE);
try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");} catch(Exception e2) {};
Edited by: cjm771 on Jul 13, 2008 7:23 PM -
Uploading problems File I/O Error 2038
Is there any way to get additional information about why this
error occurs? I am trying to upload a file, but I keep getting a
File I/O error. When I run the app on my local machine the file
upload succeeds, the I get a File I/O error. When I try to run the
same app up on my server I get the same error, but the upload
script is never even called (i.e. the HTTP request is never sent).
Any ideas? How can I figure out why I am getting this error?
Thanks,
DerekHi
Can you elaborate on what you did when you changed the
security settings -> This was fixed by changing the security
settings.
I think too that my problem has something to do with security
settings but I do not know for sure. I only know that my server
side script is never reached when trying to upload from a MAC
platform. I'm using a webhotel so I'm pretty limited in changing
the settings.
Any help will be greatly appreciated.
Have a look at my case:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid=1311564 -
Dear “Flashers”….lol
I am really at my wits end here and I am hoping that one of
you geniuses will be able to figure out my dilemma. To sum it up,
the problem is that my main.html (main.swf) will not play all the
way through once uploaded to my server. To view the site that is
currently up, you must refresh the page and then the main.html
(main.swf) will play all the way through (
http://newsocialdoctrine.com/).
So now for the long version to better understand how I got to this
point. The first time I uploaded my site to my server it worked
perfectly (connected the index.html to the main.html via splash
page and put all my .swf (s) and .html(s) on my remote sever..that
easy). I added music to enhance my site. I was now ready to make my
debut but little did I know it was about to go all down hill. When
the new site (the one with music) was loaded, it would play about
10 seconds of the main.html/swf and stop, leaving the screen black
http://newsocialdoctrine.com/truth/truth.html).
The site works perfectly using flash player. The site also works
fine when played on the local and remote side of dreamweaver when
using F12 (Mac) as a test/player. It is when I go to view my site
using an Internet browser that is stops about 10 seconds in. So any
great flash user would be lead to believe it is the server, it has
to be, that is what I though. Luckily, I am making a site for a
friend and decided to use their server as a “control”
server but all hope died when the same thing happen using there
server as well. So it is my file. With that being said ,
“no”, there is no keyframe w/a stop action placed where
the swf stops. I think it could be a streaming problem or a
publishing problem, I am not sure though. I am pressing publish and
then ok and theses are my publish settings. The rest of the swf (s)
with music work fine (
http://newsocialdoctrine.com/truth/spoken2.swf)
. It is just the main.swf (
http://newsocialdoctrine.com/truth/truth.html)
that is not fully loading which is the most important swf (because
it is the base). If ANYBODY can help, it would greatly be
appreciated.
Sincerely Photo757innono i i have not, i will have to try that.....thank you for
responding....
Maybe you are looking for
-
How to generate crystal report in sap application
hi,, i want to generate crystal report through sap application... How is it possible ....? could you help me in details? Plz help me???????????
-
Compilation problem in diferent machine
Hi All, I am having some problem in compiling my code in different machine. The problem is that i have defined classes which access each other in a cyclic manner. e.g. class A access the class B, class B access class A and C while class C access A an
-
How to decide the development platform for developing portal content?
Dear Experts There are several platforms on which we can make portal contents for SAP Portal. 1)Web Dynpro for Java 2)Web Dynpro for ABAP 3)PDK for .NET I am trying to find out which of them would be most efficient while developing system for the cli
-
Downloading Youtube videos with Quicktime 7 Pro?
I'm considering downloading Quicktime Pro 7 for my MacBook. On the Apple website, it says that I can use Quicktime Pro 7 to download videos from the internet. Will this work with Youtube? Thanks.
-
Hi, I have installed MSCS ECC6.0 MSSql Server Node 1: CI Node 2: DI ASCS * SCS on Shared Disk. Installed Enqueue Replication Server on both nodes. Tested Ensmon.exe pf=<profile> 2 Got the message Replication is Active. Installed additional Dialog Ins