Skip to content

Commit

Permalink
Merge pull request #25 from fenix-hub/dev
Browse files Browse the repository at this point in the history
complete storage support
  • Loading branch information
fenix-hub authored Jul 10, 2021
2 parents 1853e9a + 3ca63af commit 9086d8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
8 changes: 3 additions & 5 deletions addons/supabase/Storage/storage.gd
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,9 @@ func _on_task_completed(task : StorageTask) -> void:
match task._code:
task.METHODS.LIST_BUCKETS: emit_signal("listed_buckets", task.data)
task.METHODS.GET_BUCKET: emit_signal("got_bucket", task.data)
task.METHODS.CREATE_BUCKET: emit_signal("created_bucket", task.data)
task.METHODS.UPDATE_BUCKET: emit_signal("updated_bucket", task.data)
task.METHODS.EMPTY_BUCKET: emit_signal("emptied_bucket", task.data)
task.METHODS.CREATE_BUCKET: emit_signal("created_bucket", from(task.data.name))
task.METHODS.UPDATE_BUCKET: emit_signal("updated_bucket", from(task.data.name))
task.METHODS.EMPTY_BUCKET: emit_signal("emptied_bucket", from(task.data.name))
task.METHODS.DELETE_BUCKET: emit_signal("deleted_bucket", task.data)
_:
emit_signal("rpc_completed", task.data)
elif task.error != null:
emit_signal("error", task.error)
9 changes: 4 additions & 5 deletions addons/supabase/Storage/storage_bucket.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ const MIME_TYPES : Dictionary = {
"bmp": "image/bmp",
"css": "text/css",
"csv": "text/csv",
"gd": "text/gdscript",
"gd": "text/plain",
"htm": "text/html",
"html": "text/html",
"jpeg": "image/jpeg",
"jpg": "image/jpeg",
"json": "text/json",
"json": "application/json",
"mp3": "audio/mpeg",
"mpeg": "video/mpeg",
"ogg": "audio/ogg",
"ogv": "video/ogg",
"pdf": "application/pdf",
"png": "image/png",
"res": "text/plain",
"shader": "text/plain",
Expand All @@ -23,7 +24,7 @@ const MIME_TYPES : Dictionary = {
"tiff": "image/tiff",
"tres": "text/plain",
"tscn": "text/plain",
"txt": "text/plain",
"txt": "text/script",
"wav": "audio/wav",
"webm": "video/webm",
"webp": "video/webm",
Expand Down Expand Up @@ -292,8 +293,6 @@ func _on_task_completed(task : StorageTask) -> void:
task.METHODS.REMOVE: emit_signal("removed_objects", task.data)
task.METHODS.CREATE_SIGNED_URL: emit_signal("created_signed_url", task.data)
task.METHODS.DOWNLOAD: emit_signal("downloaded_object", task.data)
_:
emit_signal("rpc_completed", task.data)
elif task.error != null:
emit_signal("error", task.error)

Expand Down
3 changes: 0 additions & 3 deletions file.json

This file was deleted.

0 comments on commit 9086d8d

Please sign in to comment.