Fork me on GitHub
Reply New Topic
2010/10/1 7:14:57
#1
Offline
Home away from home

An FTP Module for ImpressCMS

Hi

I need an FTP module to allow users to upload files to my website that I can subsequently download. Better still, a module likle that that integrates with WF-Downloads (which I have installed) so that I can then 'move' the uploaded FTP'd file straights into WF-Downloads.

Do we have such a module at our disposal (other than SarahFTP

Ted


2010/10/1 7:57:44
#2
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Not that I know of...

_________________
the german icms website : www.impresscms.de

2010/10/1 13:54:53
#3
Offline
Home away from home

Re: An FTP Module for ImpressCMS

You aren't going to find anything that is integrated with anything honestly.

I recently put together a fancy contact form using a flash uploader that emails me whenever a client uploads a new file - if you are interested I can share it with you - however I bought a license for multipowupload - you would have to either do that or find a free flash uploader and reintegrate it.

Attach file:



png  uploadandmail.png (41.60 KB)
213_4ca64a9942a6f.png 488X664 px


2010/10/1 16:21:14
#4
Offline
Home away from home

Re: An FTP Module for ImpressCMS

This site runs torrents in Xoops... Bad ass!

http://www.retroroms.net/modules/news/


2010/10/1 16:37:16
#5
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Will

Your form looks ideal! Could you share please?

I have found Solmetra (http://www.solmetra.com/en/disp.php/en_products/flash_uploader/uploader_demo) which looks like a potentially suitable free flash util to incorporate?

Ted


2010/10/2 0:28:31
#6
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Quote:


thomas wrote:
This site runs torrents in Xoops... Bad ass!

http://www.retroroms.net/modules/news/


Do you need register on their site for that? Is it in their download section?


2010/10/2 0:44:31
#7
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Just recently I read about a multiupload based on jQuery. I'm sure Will has already seen that as well .

_________________
the german icms website : www.impresscms.de

2010/10/2 4:46:47
#8
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Quote:


Will wrote:
You aren't going to find anything that is integrated with anything honestly.

I recently put together a fancy contact form using a flash uploader that emails me whenever a client uploads a new file - if you are interested I can share it with you - however I bought a license for multipowupload - you would have to either do that or find a free flash uploader and reintegrate it.




This would be a decent free replacement...
http://www.swfupload.org/

This is also included in the xajax project download.

http://xajax-project.org/en/docs-tutorials/


2010/10/2 4:48:58
#9
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Quote:


UnderDog wrote:

Do you need register on their site for that? Is it in their download section?



Yep I forgot to mention that you need to send them ten bucks as a donation to gain access. Sorry but they use a lot of bandwidth serving up all the roms.


2010/10/2 9:14:15
#10
Offline
Home away from home

Re: An FTP Module for ImpressCMS

The reason I chose to use multipowupload is because the flash uploader works with chunkupload.php (injcluded in the package) - some of my clients upload 500Mb files with this thing.

If you aren't worried about filesize you could integrate whatever.

Quick setup.
* /share chmod 777 or writable by your system - depends on server
* /download.php - edit path to share folder
* /uploads/send.php add your email address.
* /uploads/File ProcessingScripts/PHP/chunkupload.php - Fix path to share folder.
* /uploads/index.html

find:
CQlsaW5rcy5pbm5lckhUTUwgKz0gImh0dHA6Ly93d3cuWU9VUl9ET01BSU4uY29tL2Rvd25sb2FkLnBocD9mPSIgKyBmaWxlLm5hbWUgKyAiIFxyXG4iOw==

Fix the url.

That should do it. Download Here


**EDIT**
Oh! I shouldprobabaly share the next part too - maintenance... who the hell wants to have to figure out when these files were uploaded! lol.... I use a cron job to delete the files after they have reached 30days old.


Edited by Will on 2010/10/3 8:10:23

2010/10/4 16:11:48
#11
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Thanks very much for sharing. I've nearly got it working but I'm falling at the last hurdle. When I click the Upload button, I receive an error pop-up, but no message?

How can I determine what the error is here, as it's flash, and therefore no PHP entries in my php log file?

I have the share dir write-enabled. I use a Windows 2008 server and IIS, so I wonder if it might be to do with having to use backslashes instead of forward slashes?



Ted


2010/10/4 16:19:50
#12
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Yep, that error was due to incorrect slashes. Swapped them round, and the file uploaded OK.

However, the confirmation screen returned an error instead. I suspect this may be due to my server requiring SMTP Authentication? If so, is there a way round this when using your form? The error log supplied in uploadform/uploads/FileProcessingScripts/PHP/error_log.txt does not contain any new data (it holds a few of your own older entries that you may want to delete?)

Also, I have two further questions

1) regarding allowed file types. I only want to allow PDF files. In the array declaration, what would be the correct way to state the extension?

".pdf", "pdf" or something else?

2) What is the max file size that the script allows? Is it dictated by the web servers php.ini settings (My post_max_size = 8Mb and my upload_max_filesize = 16Mb - which does the Flash script use?) or something else?



2010/10/5 6:44:05
#13
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Well - the script simply uses the php mailer - however if you do not have sendmail then you will have to reconstruct this line to include the smtpauth

so this
aWYgIChtYWlsKCR0bywgJHN1YmplY3QsICRtc2csICJGcm9tOiAkZW1haWxcclxuUmVwbHktVG86ICRlbWFpbFxyXG5SZXR1cm4tUGF0aDogJGVtYWlsXHJcbiIpKQ==

is going to become more like this
ICRzbXRwID0gTWFpbDo6ZmFjdG9yeSgnc210cCcsDQogICBhcnJheSAoJ2hvc3QnID0+ICRob3N0LA0KICAgICAnYXV0aCcgPT4gdHJ1ZSwNCiAgICAgJ3VzZXJuYW1lJyA9PiAkdXNlcm5hbWUsDQogICAgICdwYXNzd29yZCcgPT4gJHBhc3N3b3JkKSk7DQokc210cC0+c2VuZCgkdG8sICRoZWFkZXJzLCAkYm9keSk7

See Here

The data is already at send.php - from there you can do with it what you choose.

Upload Limit: Well, it depends on your server if you are using a straight upload. If you use chunkupload it will allow you to upload huge files.

Are you on a windows server?

If you are using multipowupload you can set the allowed file types via the parameters. Check the docs here.

Specifically fileFilter.types


2010/10/5 15:41:35
#14
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Hey Will

Thanks again for all your time and effort helping me with this,.

For several reasons (file size issues mostly) I opted to go with Solmetra Flash Uploader. It's free, easy to customise and seems to sllow files around what I need - 5-8Mb.

One issue I do have (if you have time to look) is that if I add 'pdf' to the allowed file types and add several others to the disallowed, such as 'exe', 'bat' etc) it still allows me to upload what I like. Not sure why?

Ted


2010/10/5 17:35:33
#15
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Where are you configuring the filetypes?


2010/10/6 5:32:33
#16
Offline
Home away from home

Re: An FTP Module for ImpressCMS

In the config file, 2/3 way down, for 'AllowedExtensions', 'DissalowedExtensions'.

Default setting is :

DQonYWxsb3dlZEV4dGVuc2lvbnMnICAgICAgID0+IGFycmF5KCksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW4gYXJyYXkgb2YgYWxsb3dlZCBmaWxlIGV4dGVuc2lvbnMNCiAgDQogICdkaXNhbGxvd0VkZXh0ZW5zaW9ucycgICAgPT4gYXJyYXkoJ3BocCcsICdwaHAzJywgJ3BocDQnLCAncGhwNScpLCAgICAvLyBhbiBhcnJheSBvZiBkaXNhbGxvd2VkIGZpbGUgZXh0ZW5zaW9ucw0K

My settings :

DQonYWxsb3dlZEV4dGVuc2lvbnMnICAgICAgID0+IGFycmF5KCdwZGYnKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbiBhcnJheSBvZiBhbGxvd2VkIGZpbGUgZXh0ZW5zaW9ucw0KICANCiAgJ2Rpc2FsbG93RWRleHRlbnNpb25zJyAgICA9PiBhcnJheSgncGhwJywgJ3BocDMnLCAncGhwNCcsICdwaHA1JywgJ2V4ZScsICdiYXQnKSwgICAgLy8gYW4gYXJyYXkgb2YgZGlzYWxsb3dlZCBmaWxlIGV4dGVuc2lvbnMNCg==


2010/10/6 6:25:01
#17
Offline
Home away from home

Re: An FTP Module for ImpressCMS

In download.php. or what config file?

Download.php simply controls what files are eligible to pass through the downloader. The intent of the downloader is to conceal your share folder location in the event you need to pass a link on.

Your allowed file types for uploading are controlled by the uploader itself.

In your case you need to adjust the config file for the uploader.


2010/10/6 7:09:20
#18
Offline
Home away from home

Re: An FTP Module for ImpressCMS

Hi Will

There's a config.php file in the root of the Solmetra Flash Uploader. In that file is where I pasted the above settings from. Based on the comments in that file, it seemed to me that that was the place to specify what files you wanted to allow\disallow.

I don't think there is a download.php file with this particular app (at work at moment so not able to see).

The link you refer to, I thought, was simply to restrict the selection of files based on file extension only - not it's true content type (which is what I thought the array declaration may have applied). I will certainly have another look at that but obviously with an extension-only check, someone could rename a malicious file ('nastyapp.php') to 'FriendlyPage.pdf', upload it, and on extension rules alone, this would be allowed to be uploaded (though this uploader renames the uploaded files to prevent remote execution). Ideally, I want to do a header check to ensure the file being uploaded is a PDF and only a PDF.

It might be best to register on their forum and pose my questions there rather than taking this thread off into a different direction.

For future ref, it would be super good if someone could create an FTP module for ICMS. I trust ICMS modules over and above other apps and feel assured by how they integreate with the system.


2010/10/6 11:51:11
#19
Offline
Home away from home

Re: An FTP Module for ImpressCMS

I would think it would be easier to add in the SolmetraUploader.php file as opposed to the config file - this way you can just do a simple mimetype array and check against the upload - then return an error if the mimetypes do not match.

This seems like it would be more practical, and more secure method - but I have not attempted to use solmetra yet - I wish I had know about it before buying multipow - I might have saved my company 150 bucks...

One thing I should mention is that the download link that is sent in the mailer uses the uploaders api to return the array of file names - you will need to rewrite this to use solmetras api instead. Check out the gatherUploadedFiles() reference in their docs.


2010/10/7 1:52:24
#20
Offline
Home away from home

Re: An FTP Module for ImpressCMS

i dunno about a flash uploader.. personally i hate flash, flash should be used for banner ads etc, but not as anything else IMO.

but i've found a nice jquery multi uploader, which i might add to the core jquery library, then utilise this in imDownloads.

_________________
Live as if you were to die tomorrow, Learn as if you were to live forever

The beauty of a living thing is not the atoms that go into it, but the way those atoms are put together!

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.