Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: jack001 - lokakuu 02, 2011, 04:26:52 AP

Otsikko: Upload via url
Kirjoitti: jack001 - lokakuu 02, 2011, 04:26:52 AP
Hello smf,
i am looking for a mod which uploads attachments by url.
Just pasting url, it will grab that file to your server and will attach with the post.

I have searched this mod but not available till now. Hope someone adds this mod to smf.

Thank you.
Otsikko: Re: Upload via url
Kirjoitti: jack001 - lokakuu 03, 2011, 04:02:25 AP
no reply :(
Otsikko: Re: Upload via url
Kirjoitti: kat - lokakuu 03, 2011, 05:39:21 AP
Maybe we need more information?

I THINK I get what you mean. But, I'm not certain, by a long way.
Otsikko: Re: Upload via url
Kirjoitti: butch2k - lokakuu 03, 2011, 05:56:38 AP
I did something akin to this for my needs, but you need to secure this as much as possible since it could be a serious security risk. Moreover you'll probably need curl support within PHP as well as some PEAR packages (HTTP REQUEST2 IIRC).
Otsikko: Re: Upload via url
Kirjoitti: jack001 - lokakuu 03, 2011, 10:56:19 AP
Lainaus käyttäjältä: butch2k - lokakuu 03, 2011, 05:56:38 AP
I did something akin to this for my needs, but you need to secure this as much as possible since it could be a serious security risk. Moreover you'll probably need curl support within PHP as well as some PEAR packages (HTTP REQUEST2 IIRC).

my hosting supports everything.

Even i found a script to upload via url but don't know how to use them or mod it.


Thank you both of you for your reply.
Otsikko: Re: Upload via url
Kirjoitti: Kays - lokakuu 03, 2011, 12:04:45 IP
Hi, have you got a link to that script?

I'm not saying I'm writing a mod for this. But I am curious as to how or if it could be done.
Otsikko: Re: Upload via url
Kirjoitti: jack001 - lokakuu 03, 2011, 12:38:06 IP
Here is php scripted to upload via url i found by googling. But dont know how to make mod out of it.
Otsikko: Re: Upload via url
Kirjoitti: jack001 - lokakuu 04, 2011, 12:28:50 IP
no reply! hope someone make a mod of this.
Otsikko: Re: Upload via url
Kirjoitti: Kays - lokakuu 06, 2011, 09:29:58 AP
Sorry for the delay and thanks for posting that file. Although it's poorly written, it did give me enough to get started with.

The handling of an uploaded file differs greatly to how a url upload works. So it is difficult to simply incorporate this into the current file handling process. I did have something which sorta worked. But only sorta. As a result, to do this properly, files from a url upload should be handled separately. Something which involves quite a few checks (in two places) and the handling of the file(s) should an posting error occur. Or else a heck of a lot of coding.

I am still curious about how this can be done and might poke at it a bit more. But I don't have the time to get into it completely at present.