Public Downloads From FTP

carut

Guppy
How can i make a link on my site to where people clikc and download a fire form my FTP account? What do i put for the link?
 
Not sure if I understood your question properly.
Simply upload your file to any folder in your domain directory and link to it.
 
What StPatrick is talking about is Anonymous FTP. To use that, assign a dedicated IP to your domain and then activate Anonymous FTP from Web Options

Anonymous FTP allows you to give read/write (or only read) access to a certain folder. You can read more abput Anonymous FTP from:
http://www.jodohost.com/hsphere
 
Is it possible to allow only "write" access to anonymous FTP?

I want to allow users to upload files to me via FTP. But I don't want them to be able to see what else has been uploaded. So they should just be able to put files in the folder, not see what's in there or get other files.
 
You're better off writing an upload section to your website. It'll be prettier, you can verify the names of files, place them where you want to, etc... If you're using ASP.NET, I can give you a simple examlpe.
-Dave
 
daddyc said:
Is it possible to allow only "write" access to anonymous FTP?

I want to allow users to upload files to me via FTP. But I don't want them to be able to see what else has been uploaded. So they should just be able to put files in the folder, not see what's in there or get other files.

You could give write access but users would be able to see all files.
 
WineIsGood said:
You're better off writing an upload section to your website. It'll be prettier, you can verify the names of files, place them where you want to, etc... If you're using ASP.NET, I can give you a simple examlpe.
-Dave

You're right Dave - that is probably a better solution. I just wanted clients to have a quick and easy way to send me files without having to bother visiting the site, logging in, etc.

I am writing in ASP.NET. I've already done some file saving on other parts of the site so I'll just use that code to save these files too. Thanks for the example offer though.

DaddyC
 
Okay. Well, since this is indexed, I'll provide a simple example just in case someone else wanted to know:

ASPX code:

File to upload:  
<input id="uploadedFile" type="file" name="uploadedFile" runat="server" size="50" class="newInput">&nbsp;
<asp:RequiredFieldValidator id="fileValidator" Runat="server" ControlToValidate="uploadedFile" ErrorMessage="Please choose the file to upload, you wanker." Display="Dynamic" /><br>
<asp:button Runat="server" ID="SubmitButton" Text="Upload file!" />

ASPX.VB code-behind:

Imports System.IO

Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitButton.Click
Dim FileName as String

FileName = uploadedFile.PostedFile.FileName 'This is the full file name
uploadedFile.PostedFile.SaveAs(destination path and filename here) 'Save the uploaded file!
End Sub

Remember, large files may require more time to upload than the default script timeout allows. Extend the timeout in your page_load() event using:
Server.ScriptTimeout=<number of seconds>

Also, the maximum upload size may be larger than allowed. You can easily fix this with a web.config entry like this example of 64mb:
<httpRuntime maxRequestLength="65536" />

-Dave
 
Back
Top