Weblink ID in server variable

Please post here if you have problems in using Wing FTP Server.

Weblink ID in server variable

Postby JohnRambo » Mon Jun 17, 2019 12:59 pm

Hi,

I'm currently trying to identify weblink ID use to download the file from weblink.

I can identify that this is a weblink using %Name however I don't have the link unique identifier.

I'm generating several weblink for the same file in WEBLINK folder so on HTTP event OnFileDownloaded I would like a way to catch from which link download effectively happened.

Thanks
JohnRambo
 
9
 
Mon Jun 17, 2019 12:52 pm

Re: Weblink ID in server variable

Postby FTP » Tue Jun 18, 2019 5:47 am

OK, you can create a weblink automatically using Lua script in the event "OnFileUploaded -> Lua Script":

Code: Select all
local filepath = string.gsub("%PathName", "\\","/")
local filename = "%FileName"
local weblink = md5(filepath..c_GetGlobalOptionStr(GOPTION_START_TIME_STR))
local fp = assert(io.open(c_GetAppPath().."/Data/_WEBLINK/"..weblink, "wb"))
fp:write(filepath.."\r\n-1\r\n-1")
fp:close()


And the weblink filename (or file path) is also defined in the above code.
FTP
Site Admin
 
1679
 
Tue Sep 29, 2009 6:09 am

Re: Weblink ID in server variable

Postby JohnRambo » Tue Jun 18, 2019 8:24 am

Hi

Thanks for providing the step for doing it on upload.
But I'm already doing this with my _WEBLINK folder mapped into a network shared folder.

My use case is that I need to send the same file to several customer.
And I want to identify who as downloaded it and when.

To do so I plan to use several weblink for the same file and send each to different customer.

As of now i'm just missing the way to identify which link trigger the event OnFileDownloaded.

Now with "%Name" i got the following "[WEBLINK]"
What could be of interest here is to get link ID with "%UserEmail",
JohnRambo
 
9
 
Mon Jun 17, 2019 12:52 pm

Re: Weblink ID in server variable

Postby FTP » Wed Jun 19, 2019 1:03 am

OK, Wing FTP Server does not support such requirement, there is no Weblink ID variable, maybe you can get the client IP address via the variable "%IP".
FTP
Site Admin
 
1679
 
Tue Sep 29, 2009 6:09 am

Re: Weblink ID in server variable

Postby JohnRambo » Wed Jun 19, 2019 8:56 am

Hi,

I manage to use IP with some of my customer who have fixed IP, but some haven't or didn't want to share.
This partially solve my issue.

Is this possible to add such improvement / Feature for next release ?
Or to get a patch for the current one ?
Event manager is a really cool Feature and totally allow to identify the trigger when it's FTP/SSH event type.
But not when it comes to HTTP event where only the ID could do so.

Thanks,
JohnRambo
 
9
 
Mon Jun 17, 2019 12:52 pm

Re: Weblink ID in server variable

Postby JohnRambo » Mon Jun 24, 2019 8:59 am

Hi

Do you have any update on feasibility of such request ?

Regards
JohnRambo
 
9
 
Mon Jun 17, 2019 12:52 pm

Re: Weblink ID in server variable

Postby FTP » Tue Jun 25, 2019 5:35 am

Sorry, there is no plan to add such feature, because WingFTP doesn't support multiple weblinks for the same file.
And the possible method for you is, create different subfolder for different customer, and then copy the file into each folder and generate weblink, the recent version of WingFTP already supports copy function in the web client.
FTP
Site Admin
 
1679
 
Tue Sep 29, 2009 6:09 am

Re: Weblink ID in server variable

Postby JohnRambo » Tue Jun 25, 2019 2:41 pm

Hi,

Thanks for your answer.
Still hope to see an addition of the multiple weblink feature for the future.

Regards
JohnRambo
 
9
 
Mon Jun 17, 2019 12:52 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests