Uploading Question

See all posts Reply

Uploading Question new!
by Bogey, 14 years, 11 months ago
I need to rename that image and check if that image is exists in the directory I want to upload them to (renamed image). How do I do that?Reply
Re: Uploading Question new!
by Bogey, 14 years, 11 months ago
Nevermind, I figured out how to rename the file, but there are quite a few other problems I've got here, which is beginning to make me mad here.

What I need is to be able to upload either a file from a website (http://www.domain.com/images/image.jpg) or from a hard disk (C:/images/image.jpg), and the problem here is that I only can do from hard disk.

Another problem I've got is that I don't know how to check if a certain file with a certain name already exists, and deleting it if it exists before I upload the new file with that same name in there.Reply
Re: Uploading Question new!
by colin, 14 years, 11 months ago
You cannot upload a file from a website directly. However, you can write a few lines of code to retrieve the picture from the website, and then process it with the class (look in the doc for how to process local files)

As for overwriting existing files, from version 0.27, simply set file_overwrite to true (If you use an older version, you also have to set file_auto_rename to false).Reply
Re: Uploading Question new!
by Bogey, 14 years, 10 months ago
^"However, you can write a few lines of code to retrieve the picture from the website, and then process it with the class (look in the doc for how to process local files)";

Problem is, I'm not sure how to accomplish that.Reply
Re: Uploading Question new!
by colin, 14 years, 10 months ago
Which part do you not understand?Reply