PDA

View Full Version : how to use ftp upload functions?


Evanrich
1st of October 2003 (Wed), 05:53
Please excuse my stupidity in asking this... but in the new beta 2, how do you use the ftp functions? for the life of me I can't figure this out. I managed to get my ftp server set up in the ftp server settings window, but as far as image uploading and such, I cannot figure this out.. I just upload the old fashioned way.... creating the directories by hand.

Can anyone help?


Thanks

Evan

Pekka
1st of October 2003 (Wed), 12:48
evanrich wrote:
Please excuse my stupidity in asking this... but in the new beta 2, how do you use the ftp functions? for the life of me I can't figure this out. I managed to get my ftp server set up in the ftp server settings window, but as far as image uploading and such, I cannot figure this out.. I just upload the old fashioned way.... creating the directories by hand.

Can anyone help?


Thanks

Evan

The short version:

SETTING IT UP FIRST TIME

1. Set up ftp servers.

2. Set up graphics modules. "Graphics modules editor" is actually test suite - do each test and tell EE the results. You will need to have either GD, Imagick or Imagemagick (recommended) to make resize system work.

3. Prepare resize methods. "Resize methods editor" let's you design your own resize commands.

4. Map all of above together in "path setup".

Each path contains:

MENU TEXT this is what visitors see when they choose different sizes. Use something descriptive. This setting is multilingual.
URL www address to your image size folder. Like http://www.myserver.com/mygallery/images/large/ . Trailing slash is required.

VARIABLE this is a short name for PHP to know what size we are talking about, this is editable only because default has a special meaning for EE.

FTP SERVER here you select ftp server where this size path is stored. OFF means that this size is not listed in automated upload system.

FTP FOLDER here you enter ftp path to folder which holds images of this size. When you log into this ftp server using standard ftp program, the first level you are in after login is called 'ftp root'. Ftp root is in other words the home directory in your ftp account. FTP FOLDER is a path from that ftp root to folder which holds images for this size. NOTE: This path does NOT have a trailing slash. If you are unsure what this path is, you can use any ftp program to log in, browse to this folder and give command 'pwd' which outputs the current 'working directory': this is the path you need to enter here.

RESIZE METHOD here you choose a method to resize.

Now, after all above is set up, all uploading is done on UPLOAD page.

UPLOADING

Just follow the workflow. Any paths you entered in path editor are created in they are not there. It all works using ftp, and all is reported in ftp messages window. Note that thumbnail and microthumbnail paths are set in exhibition editor (once they are set there and first images uploaded, don't change them again, simply because each exhibition has one thumb and one microthumb path). Because EE takes now care that you can't upload identical filenames it's perfectly safe and sound to use just one thumb and one microthumb path for all exhibitions.


Do a simple setup to test with. Just one size, one ftp server and one path. Use the test photo in upload "bin" to test uploads.

EXIF and IPTC data is applied to database if available. IPTC data means the data you can write in Photoshop's "file info" dialog - so you can write headers, keywords, description texts and locations etc. beforehand and they will stay with original image.

iamhives
1st of October 2003 (Wed), 23:45
Pekka - With your help I'm getting there. Having hopefully my final problems with upload set-up. I seem to have Imagemagick etc setup tp go - just need to get the ftp setup correct.

I'm note sure I understand the difference between "Ftp setup" section and the EE Home FTP server. During the two tests what files are copied from where and to where ?

In the FTP server test I get errors for all the 5 test files

I'm using the following path
/www//mygallery/myinput/ for the ftp server test path. All the upload, get and delete commands fail - however the login, change directory sections seem to work

Probably an easy path problem...

iceman
2nd of October 2003 (Thu), 08:41
IAM Hives---Create the "test" folder under mygallery
And try this:
/www/mygallery/test

iamhives
2nd of October 2003 (Thu), 10:10
Still no luck. Tries many combos like this including directories that both eixst and do not exist. It alays fails on the 'get' tests

Pekka
2nd of October 2003 (Thu), 14:18
iamhives wrote:
Still no luck. Tries many combos like this including directories that both eixst and do not exist. It alays fails on the 'get' tests

If you get all other test ok, then it just means that your ftp server does not return filesize and file modification date info by request. I'll use that info for checking identical files, and it is not _required_.

So, if tests:

FTP SERVER NAME:
FTP SERVER:
CONNECTION (ftp address):
LOGIN (username and password):
PWD:
CHANGE DIRECTORY TO '/your/test':
CREATE DIRECTORY 'ee_ftp_test_directory_creation':
CHANGE DIRECTORY TO '/your/test/ee_ftp_test_directory_creation':
CHANGE DIRECTORY TO '/your/test':
DIRECTORY 'ee_ftp_test_directory_creation' REMOVAL:
UPLOAD TEST IMAGE 'ee_test0.jpg':
UPLOAD TEST IMAGE 'ee_test1.jpg':
UPLOAD TEST IMAGE 'ee_test2.jpg':
UPLOAD TEST IMAGE 'ee_test3.jpg':
UPLOAD TEST IMAGE 'ee_test4.jpg':
DELETE REMOTE TEST IMAGE 'ee_test0.jpg':
DELETE REMOTE TEST IMAGE 'ee_test1.jpg':
DELETE REMOTE TEST IMAGE 'ee_test2.jpg':
DELETE REMOTE TEST IMAGE 'ee_test3.jpg':
DELETE REMOTE TEST IMAGE 'ee_test4.jpg':

are ok then go ahead and try using the upload and resize system!

If you have problems with above tests, troubleshoot from top to bottom, i.e.

- if "CONNECTION (ftp address):" fails
wrong username and/or wrong password

- if LOGIN (username and password): fails
server does not give you permission to log in. If above test is not ok, this will never be possible.

- CHANGE DIRECTORY TO '/your/test': fails
you have no permissions to create directories here. Most likely you test folder is outside your ftp root (see EE's internal help). If above test are not ok, this will never be possible.


- CREATE DIRECTORY 'ee_ftp_test_directory_creation':
CHANGE DIRECTORY TO '/your/test/ee_ftp_test_directory_creation':
CHANGE DIRECTORY TO '/your/test':
DIRECTORY 'ee_ftp_test_directory_creation' REMOVAL:
These test basic directory creation, change into and back and deleting a directory. If above test (login) are not ok, this will never be possible.

- UPLOAD TEST IMAGE 'ee_test0.jpg': fails
basic file upload problem. If above test are not ok, this will never be possible.

- GET 'ee_test0.jpg' SIZE:
test if getting file size info is possible. If above test are not ok, this will never be possible.

- GET 'ee_test0.jpg' MODIFIED DATA:
test if getting file modification date and time info is possible. If above test are not ok, this will never be possible.

- DELETE REMOTE TEST IMAGE 'ee_test0.jpg': fails
if this fails it means files can not be deleted. This may be because ftp server gives wrong permissions for files (rare). If above test are not ok, this will never be possible.

- DISCONNECTION FROM SERVER (close): fails
if this fails it just means PHP function had a bug, There are lots of PHP bugs in this command and later PHP versions may have this fixed. If above test are not ok, this will never be possible.