Skip to content

Commit

Permalink
fix(upload): don't encode path limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
as-op committed Jun 26, 2024
1 parent e378df5 commit 202e86c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entrypoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def initialize(options)

def upload(entry)
filename = File.join(@options[:destination_root], entry)
destination = "#{@options[:nc_path]}#{entry}"
encoded_entry = entry.split('/').map{ |part| CGI.escape(part) }.join('/')
destination = "#{@options[:nc_path]}#{encoded_entry}"
puts "Uploading"
puts " from: #{filename}"
puts " to: #{destination}"
uri = URI.parse(CGI.escape(destination))
uri = URI.parse(destination)
header = { "Content-Type": MIMETYPE }
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
Expand Down

0 comments on commit 202e86c

Please sign in to comment.