We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 572249e commit 7f20bb6Copy full SHA for 7f20bb6
lib/fts3_web/controllers/upload_controller.ex
@@ -318,8 +318,11 @@ defmodule Fts3Web.UploadController do
318
api_key = config[:key]
319
bucket_name = config[:bucket]
320
321
+ # URL-encode the filename to handle spaces and special characters
322
+ encoded_filename = URI.encode(filename, &URI.char_unreserved?/1)
323
+
324
# Construct the upload URL
- upload_url = "#{base_url}/storage/v1/object/#{bucket_name}/#{filename}"
325
+ upload_url = "#{base_url}/storage/v1/object/#{bucket_name}/#{encoded_filename}"
326
327
# Detect content type based on file extension
328
content_type = get_content_type(filename)
0 commit comments