Hi,
I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into an
ftp snag and I think it is part ftp and part .net coding.
Heres the issue..
We have an image directory full of photos like 200,000 in it, and if you use
an ftp client to ftp to the site and then navagate to that file it will try
to read it / open it. Well of course it will time out and I understand that.
Now if i drag an image from my PC in the ftp client and drop it on top the
folder with the images it saves it there fine no error or timeout.
So our program will be uploading images to this dir and we need to have it
save the image to this dir and not open or read it just save the file to it.
Below is the code being used for the image upload and it still times out it
is obvious it is trying to read the file first.
Two questions is there an alternate way to ftp, a different command maybe..
Or better yet another way to get images from the users computer using this
program to our server??
Open to all ideas willing to pay for a fix / work around.
Code below and other forums we posted this on please review all data and
other forums we have put this on perl forums because our site uses perl, .net
forums, and ftp forums..
Please help us:
code
Friend Sub ftpfile()
Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String
' For testing purpose we have hard-coded the input file
sFTPSrcFileName = "D:\446224_2_th umb.jpg"
sFTPTgtFileName = "sample1.jp g"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTi meout = 60
Inet1.RemotePor t = 21
Inet1.AccessTyp e = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername "
Inet1.Password = "mypassword "
Inet1.Execute , "PUT" & sFTPSrcFileName & " " &
"/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e
Me.WaitForRespo nse
Inet1.Execute sURL, "CLOSE"
Me.WaitForRespo nse
End Sub
Friend Sub WaitForResponse ()
Dim fWait As Boolean
On Error GoTo ErrHandler
fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExec uting
Loop
ErrHandler:
Err.Clear
End Sub
Private Sub Command1_Click( )
Form1.ftpfile
Timer1.Enabled = True
Set Form1 = Nothing
Unload Me
End Sub
Private Sub Inet1_StateChan ged(ByVal State As Integer)
On Error Resume Next
Select Case State
Case icNone
Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..."
Case icConnected: Me.lblRESPONSE. Caption = "Connected"
Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..."
Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .."
Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed"
Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo
Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."
End Select
Me.lblRESPONSE. Refresh
Err.Clear
End Sub 3 2039
The forums we posted on: http://forums.devshed.com/t291783/s.html http://forums.devshed.com/t291774/s.html http://forums.devshed.com/t291765/s.html http://forums.devshed.com/t291765/s.html
JGBNS wrote: Hi,
I am new to this forumand I apologize as i am not a .net programmer but we have a program being developed by a .net programmer. Nowwe have run into an ftp snag and I think it is part ftp and part .net coding.
Heres the issue..
We have an image directory full of photos like 200,000 in it, and if you use an ftp client to ftp to the site and then navagate to that file it will try to read it / open it. Well of course it will time out and I understand that. Now if i drag an image from my PC in the ftp client and drop it on top the folder with the images it saves it there fine no error or timeout.
So our program will be uploading images to this dir and we need to have it save the image to this dir and not open or read it just save the file to it. Below is the code being used for the image upload and it still times out it is obvious it is trying to read the file first.
Two questions is there an alternate way to ftp, a different command maybe..
Or better yet another way to get images from the users computer using this program to our server??
Open to all ideas willing to pay for a fix / work around.
Code below and other forums we posted this on please review all data and other forums we have put this on perl forums because our site uses perl, .net forums, and ftp forums..
Please help us:
code
Friend Sub ftpfile()
Dim sFTPSrcFileName As String Dim sFTPTgtFileName As String
' For testing purpose we have hard-coded the input file sFTPSrcFileNam e = "D:\446224_2_th umb.jpg" sFTPTgtFileNam e = "sample1.jp g" Dim sURL As String sURL = "ftp://ftp.mysite.com" Inet1.Protoc ol = icFTP Inet1.RequestT imeout = 60 Inet1.RemotePo rt = 21 Inet1.AccessTy pe = icDirect Inet1.URL = "ftp://ftp.mysite.com" Inet1.UserNa me = "myusername " Inet1.Passwo rd = "mypassword " Inet1.Execut e , "PUT" & sFTPSrcFileName & " " & "/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e
Me.WaitForResp onse Inet1.Execut e sURL, "CLOSE" Me.WaitForResp onse
End Sub
Friend Sub WaitForResponse ()
Dim fWait As Boolean
On Error GoTo ErrHandler
fWait = True Do Until fWait = False DoEvents fWait = Inet1.StillExec uting Loop
ErrHandler: Err.Clear End Sub
Private Sub Command1_Click( ) Form1.ftpfil e Timer1.Enabl ed = True Set Form1 = Nothing Unload Me End Sub
Private Sub Inet1_StateChan ged(ByVal State As Integer) On Error Resume Next
Select Case State Case icNone Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host" Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved" Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..." Case icConnected: Me.lblRESPONSE. Caption = "Connected" Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..." Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .." Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed" Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."
End Select
Me.lblRESPONSE .Refresh
Err.Clear
End Sub
Hi,
First off, if you want to pay someone, you are free to use sites like
'rentacoder.com '. Service here is provided free.
Secondly, you do not have to use FTP. You can write an aspx web page that
will recieve the file, and you can have an html web page that provides a
'browse' button, collects the name of a local file, and posts it to the aspx
page on the server.
An example is here: http://support.microsoft.com/default...b;en-us;323245
Normally, if you use a file system for storing large amounts of data, you
may want to have the receiving side move the files into subdirectories based
on some file attribute (like date, size, or id of the submitting user).
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"JGBNS via DotNetMonster.c om" <u14341@uwe> wrote in message
news:5500911db9 4d1@uwe... Hi,
I am new to this forumand I apologize as i am not a .net programmer but we have a program being developed by a .net programmer. Nowwe have run into an ftp snag and I think it is part ftp and part .net coding.
Heres the issue..
We have an image directory full of photos like 200,000 in it, and if you use an ftp client to ftp to the site and then navagate to that file it will try to read it / open it. Well of course it will time out and I understand that. Now if i drag an image from my PC in the ftp client and drop it on top the folder with the images it saves it there fine no error or timeout.
So our program will be uploading images to this dir and we need to have it save the image to this dir and not open or read it just save the file to it. Below is the code being used for the image upload and it still times out it is obvious it is trying to read the file first.
Two questions is there an alternate way to ftp, a different command maybe..
Or better yet another way to get images from the users computer using this program to our server??
Open to all ideas willing to pay for a fix / work around.
Code below and other forums we posted this on please review all data and other forums we have put this on perl forums because our site uses perl, .net forums, and ftp forums..
Please help us:
code
Friend Sub ftpfile()
Dim sFTPSrcFileName As String Dim sFTPTgtFileName As String
' For testing purpose we have hard-coded the input file sFTPSrcFileName = "D:\446224_2_th umb.jpg" sFTPTgtFileName = "sample1.jp g" Dim sURL As String sURL = "ftp://ftp.mysite.com" Inet1.Protocol = icFTP Inet1.RequestTi meout = 60 Inet1.RemotePor t = 21 Inet1.AccessTyp e = icDirect Inet1.URL = "ftp://ftp.mysite.com" Inet1.UserName = "myusername " Inet1.Password = "mypassword " Inet1.Execute , "PUT" & sFTPSrcFileName & " " & "/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e
Me.WaitForRespo nse Inet1.Execute sURL, "CLOSE" Me.WaitForRespo nse
End Sub
Friend Sub WaitForResponse ()
Dim fWait As Boolean
On Error GoTo ErrHandler
fWait = True Do Until fWait = False DoEvents fWait = Inet1.StillExec uting Loop
ErrHandler: Err.Clear End Sub
Private Sub Command1_Click( ) Form1.ftpfile Timer1.Enabled = True Set Form1 = Nothing Unload Me End Sub
Private Sub Inet1_StateChan ged(ByVal State As Integer) On Error Resume Next
Select Case State Case icNone Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host" Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved" Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..." Case icConnected: Me.lblRESPONSE. Caption = "Connected" Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..." Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .." Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed" Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."
End Select
Me.lblRESPONSE. Refresh
Err.Clear
End Sub
You don't define what INET is. What component or object are you using
to manage the ftp?
I use a c# ftp library (its open sourced and available on the Internet)
to do a whole host of ftp related automated tasks and it works just fine.
JGBNS via DotNetMonster.c om wrote: Hi,
I am new to this forumand I apologize as i am not a .net programmer but we have a program being developed by a .net programmer. Nowwe have run into an ftp snag and I think it is part ftp and part .net coding.
Heres the issue..
We have an image directory full of photos like 200,000 in it, and if you use an ftp client to ftp to the site and then navagate to that file it will try to read it / open it. Well of course it will time out and I understand that. Now if i drag an image from my PC in the ftp client and drop it on top the folder with the images it saves it there fine no error or timeout.
So our program will be uploading images to this dir and we need to have it save the image to this dir and not open or read it just save the file to it. Below is the code being used for the image upload and it still times out it is obvious it is trying to read the file first.
Two questions is there an alternate way to ftp, a different command maybe..
Or better yet another way to get images from the users computer using this program to our server??
Open to all ideas willing to pay for a fix / work around.
Code below and other forums we posted this on please review all data and other forums we have put this on perl forums because our site uses perl, .net forums, and ftp forums..
Please help us:
code
Friend Sub ftpfile()
Dim sFTPSrcFileName As String Dim sFTPTgtFileName As String
' For testing purpose we have hard-coded the input file sFTPSrcFileName = "D:\446224_2_th umb.jpg" sFTPTgtFileName = "sample1.jp g" Dim sURL As String sURL = "ftp://ftp.mysite.com" Inet1.Protocol = icFTP Inet1.RequestTi meout = 60 Inet1.RemotePor t = 21 Inet1.AccessTyp e = icDirect Inet1.URL = "ftp://ftp.mysite.com" Inet1.UserName = "myusername " Inet1.Password = "mypassword " Inet1.Execute , "PUT" & sFTPSrcFileName & " " & "/httpdocs/myfile/images/imgupld/" &sFTPTgtFileNam e
Me.WaitForRespo nse Inet1.Execute sURL, "CLOSE" Me.WaitForRespo nse
End Sub
Friend Sub WaitForResponse ()
Dim fWait As Boolean
On Error GoTo ErrHandler
fWait = True Do Until fWait = False DoEvents fWait = Inet1.StillExec uting Loop
ErrHandler: Err.Clear End Sub
Private Sub Command1_Click( ) Form1.ftpfile Timer1.Enabled = True Set Form1 = Nothing Unload Me End Sub
Private Sub Inet1_StateChan ged(ByVal State As Integer) On Error Resume Next
Select Case State Case icNone Case icResolvingHost : Me.lblRESPONSE. Caption = "Resolving Host" Case icHostResolved: Me.lblRESPONSE. Caption = "Host Resolved" Case icConnecting: Me.lblRESPONSE. Caption = "Connecting ..." Case icConnected: Me.lblRESPONSE. Caption = "Connected" Case icResponseRecei ved: Me.lblRESPONSE. Caption = "Transferri ng File..." Case icDisconnecting : Me.lblRESPONSE. Caption = "Disconnecting. .." Case icDisconnected: Me.lblRESPONSE. Caption = "Disconnect ed" Case icError: MsgBox "Error:" & Inet1.ResponseC ode & " " & Inet1.ResponseI nfo Case icResponseCompl eted: Me.lblRESPONSE. Caption = "Process Complete."
End Select
Me.lblRESPONSE. Refresh
Err.Clear
End Sub This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Flynn |
last post by:
hi all
i'm going to be quick i have an assignment due which i have no idea how to
do. i work full time so i dont have the time to learn it and its due date
has crept up on me ..
As follows:
Objectives
The purpose of this assignment is to have you practice the design of
object-oriented classes, including one or more of the following concepts
|
by: mark |
last post by:
Hello-
i am trying to make the function addbitwise more efficient. the code
below takes an array of binary numbers (of size 5) and performs
bitwise addition. it looks ugly and it is not elegant but it appears
to work. using time, i measured it takes .041s to execute, which i
admit isnt much. but, the problem is that this procedure will be
called many, many times in my project (probably at least a few
thousand times, if not more) so...
|
by: Rafael |
last post by:
Hi Everyone,
I need some help with my calculator program. I need my program to
do 2 arguments and a 3rd, but the 3rd with different operators. Any
help would be great.
Here is my code....
#include <stdio.h>
#include <stdlib.h>
|
by: JGBNS via DotNetMonster.com |
last post by:
Hi,
I am new to this forumand I apologize as i am not a .net programmer but we
have a program being developed by a .net programmer. Nowwe have run into an
ftp snag and I think it is part ftp and part .net coding.
Heres the issue..
We have an image directory full of photos like 200,000 in it, and if you use
an ftp client to ftp to the site and then navagate to that file it will try
|
by: cpptutor2000 |
last post by:
Could some C guru please help me? I have a simple piece of code as:
#include <stdio.h>
#include <stdlib.h>
#include <openssl/rand.h>
int main(){
unsigned char temp;
RAND_bytes(temp, 4);
| |
by: genestarwing |
last post by:
QUESTION:
Write a program that opens and read a text file and records how many
times each word occurs in the file. Use a binary search tree modified
to store both a word and the number of times it occurs. After the
program has read the file, it should offer a menu with three choices.
the first is to list all the words along with the number of occurences.
The second is to let you enter a word, with the program reporting how
many times the...
|
by: carlos123 |
last post by:
Hello, I am using BlueJ and I am totally lost on my newest programming assignment. Here is my source code, i would really appreciate if someone helped me out. This is my assignment. Ive done some of the work like entering all the data in for the combo boxes. But I dont know how to get the combo box to display, and I dont know how to write and read to a file, im SOo lost. If someone could just PLEASE take a look at the code and try to fix the...
|
by: Tsunami Tim |
last post by:
To give you an idea of what I need help with...
I am driving traffic to our company website with flyers that are going out to schools for our summer camp programs. All these flyers contain a "secret code" in the form of an eight digit number eg. 20081999 I have approx 8,000 flyers going out to schools with an individual code on each. These secret code flyers we will be giving away 1 free summer camp per school / location. What I am need of a...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |