Jump to content
pwbeninate

Convert file path to URL

Recommended Posts

pwbeninate    0

Hey guys,

 

I'm working on an Automator workflow that uploads a file to an FTP server (using Transmit) and sends an HTTP link to that file via email.

 

The problem I'm running into is automating the bit that converts the file path to a URL. Here's an example to explain:

 

File = /Users/user/Desktop/file.name
URLPrefix = [url="http://server.host.net/folder/"]http://server.host.net/folder/[/url]

Output = [url="http://server.host.net/folder/file.name"]http://server.host.net/folder/file.name[/url]

 

Anyone have a bit of AppleScript (or bash script) to handle that? Better yet, an Automator action??

Share this post


Link to post
Share on other sites
Graham    1

This should be easy. I'll have a bash when I get a second. BTW, have you tried Rumpus? You can configure it to do this automagically when the file is uploaded using the web front end. Can PM you a test login to our rumpus server if you want to have a try.

Share this post


Link to post
Share on other sites
Graham    1

I've done it, but it aint pretty. PM me an email address that I can send it to. I might put it online somewhere if anyone else thinks this would be useful.

Share this post


Link to post
Share on other sites
pwbeninate    0
BTW, have you tried Rumpus? You can configure it to do this automagically when the file is uploaded using the web front end.

 

Yep. Rumpus is great. I use it on all the FTP servers I set up. Sadly the particular server in question is not running Rumpus, so I'll have to do this client-side.

Edited by pwbeninate

Share this post


Link to post
Share on other sites
pwbeninate    0

Huge thanks to Graham for coming up with a perfect solution to this!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online

×