diff --git a/lib/lobber/uploader.rb b/lib/lobber/uploader.rb
index <HASH>..<HASH> 100644
--- a/lib/lobber/uploader.rb
+++ b/lib/lobber/uploader.rb
@@ -48,7 +48,8 @@ module Lobber
     end
 
     def create_file file
-      bucket.files.create(key: file, public: true, body: File.open(file))
+      key = File.basename(file)
+      bucket.files.create(key: key, public: true, body: File.open(file))
     end
 
     def s3
diff --git a/spec/lib/lobber/uploader_spec.rb b/spec/lib/lobber/uploader_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/lobber/uploader_spec.rb
+++ b/spec/lib/lobber/uploader_spec.rb
@@ -87,8 +87,10 @@ describe Lobber::Uploader do
   describe "#create_file" do
     it "creates an s3 file" do
       allow(File).to receive(:open).and_return 'content'
-      expect(uploader.bucket.files).to receive(:create).with(key: 'foo', public: true, body: 'content')
-      uploader.create_file "foo"
+      expect(uploader.bucket.files)
+        .to receive(:create)
+        .with(key: 'foo.bar', public: true, body: 'content')
+      uploader.create_file "/home/foo.bar"
     end
   end
Set key to basename of file

Happens when lobbing a dir outside of the current path