Uploading External Files
What are external files? Any file referenced within SiteSpinner that has not been inserted as part of the project is an external file. For example, an external file could be referenced from a Code Object or a link to a file. These files could be JavaScript files, PDFs, or media required by scripts. Because external files are outside the project, SiteSpinner will not automatically upload them when you publish the project, meaning you must manually upload them. This tutorial discusses four ways to do this.
Using SiteSpinner
With SiteSpinner, the process is straightforward. Use the SiteSpinner Embed File or Media tool button () to choose the “Publish File” option from the Format drop-down menu. Then, use the “Filepath” button to locate the desired file (see figure 1). Click “OK” to save it to the current project page. The Publish File object adds about 24 characters of HTML code to your web page but is not displayed.
If you have multiple files to upload, add a new page to your project specifically for Publish Objects. Once the external file is uploaded and stored on your site, you can remove the Publish File object from your page. If you use a separate page for Publish Objects, remove that page so it is not republished. There is no reason to upload external files again after they are already uploaded.
By default, the Publish object uploads a file to your server’s root folder. However, if you need to upload the file to a specific folder, SiteSpinner offers the flexibility to use the “Sub Folder” text field to specify the desired folder name (see figure 2). For example, you may want all PDF files in a “pdf” folder or add media files in a “media” folder. This feature gives you full control over the file organization on your server.
Using your host’s file manager
Every web server host provides a control dashboard or panel for maintaining your site. One feature of the dashboard is a file manager that allows you to upload and download files. I have used many servers during my career and found the built-in file manager acceptable but slower than using SiteSpinner Publish Objects or an FTP client.
Using a file transfer client (FTP)
The File Transport Protocol (FTP) is the primary method for transferring files between computers. This method requires an FTP server, which resides on your host, and a client, which must be installed on your computer. Most hosts automatically create an FTP user account using your host login name, but some hosts require you to create an FTP user account. Use your host’s control panel to verify whether an FTP account is automatically created. If not, then it must be manually created. You can also make additional FTP accounts if needed.
There are many FTP client applications you can download and install. Searching the web or Microsoft Store for ‘FTP’ will give you a list of clients, both free and for purchase. Many hosts use FTP servers with a secured version of FTP, either Secure FTP (SFTP) or FTP Secure (FTPS). It’s important to note that these are two different applications. SFTP, or Secure FTP, is a network protocol that provides secure file transfers, while FTPS, or FTP Secure, is an extension of FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols. Make sure the FTP client you choose supports the method used by your host. If your host uses SFTP or FTPS, you cannot use a plain vanilla FTP client.
SiteSpinner only supports FTP and FTPS, so if your host uses SFTP, you must publish your project to disk and upload your files using an SFTP client.
Using a Windows network location
Windows provides a feature allowing you to connect directly with a network location. Open a File Explorer window and right-click. A menu shows several options, including “Add a network location” (see figure 3). Clicking this option will open the “Add Network Location Wizard” window. As you work through the steps, you will enter your website domain name preceded with “ftp://” and your login user name, and you can name this shortcut. Clicking the shortcut in File Explorer, you will be prompted for the password, which you can save for later connections.
However, it’s important to note that this method is not recommended due to potential security risks. Directly connecting your computer to your website through a Windows network location can expose your website to manipulation by anyone with access to or who steals your computer.