Author Topic: Append Custom URL for Member Upload  (Read 5084 times)

0 Members and 1 Guest are viewing this topic.

Offline Instigator

  • Newbie
  • *
  • Posts: 34
    • View Profile
Append Custom URL for Member Upload
« on: August 25, 2005, 09:14:49 PM »
Hi,

I am hosting my data files on another webserver on the same box. I wish to automatically edit the download_url when a member uploads a file so the download_url reflects the member uploads. For example, member uploads image name "myfile.mp3". The download_url is automatically updated with following text "http://www.mysite.com:8080/categorynumber/myfile.mp3"

Also, can the same be done for the check_images function in acp where if I add some files through ftp they will be added to the database with download_url automatically updated?

Help is needed on this because I need to control the bandwidth used by my 4images site and moving to an alternative webserver is the only option I have.

thanks!

Offline Instigator

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Append Custom URL for Member Upload
« Reply #1 on: January 11, 2006, 08:03:15 AM »
I have gone through some of the 4images php files but because I'm a php newbie I can't figure out what I should edit. Moreover, this feature I am requesting would be such a big help for many users who have multiple servers.

Can anyone help me?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Append Custom URL for Member Upload
« Reply #2 on: January 11, 2006, 12:36:11 PM »
Well, first, if you waited all this time to have an answer and you didn't have any - it is clairly that no one has an answer for you (or either the solution is much too complex to be posted on the forum).

However, to answer your last question above, the file you should edit is : member.php. Then, you need to find the right "$action" string according to the routine you wish to modify in order to accomplish this. ;)

Offline Instigator

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Append Custom URL for Member Upload
« Reply #3 on: January 11, 2006, 03:30:21 PM »
There is another way to do this which maybe has not been thought of.

Rather than change the download_url entry ONLY the download.php file can be edited. So for example, I have my main webserver running on port 80 and my site is www.mysite.com. This has my site as normal and data files in www.mysite.com/data/media/cat/

Members upload as normal to my site. Now, I have another webserver running which has document_root set as /data/ and whenever someone hits the download button they get to download the file via http://www.mysite.com:8080/media/cat/filename/

Only disadvantage of this method is probably the link to the file will be exposed but that is not a big problem as I can run an automated script to change the name of the media folder once every few days.

So in short I need an edited version of download.php which allows download of a file with the form of http://www.mysite.com:8080/media/cat/filename/ where cat and filename are received from the database.

I hope someone can help  :|