ayadn 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ayadn/fileops.rb +3 -3
- data/lib/ayadn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d24e69e9bb60c49085dbb5a2301b2da8b9789f7
|
|
4
|
+
data.tar.gz: 39c9219947d43fdb3bf16bf4643fa8a8141a456c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc082c53a74daff0a800cfb9fcd2f663730e9f35b7e96bd3fe80a35a4353914060cdcd1e3e7f965608942c9e0ba2f5eddbf9852295eeede5ff46bc9f4cbb9e37
|
|
7
|
+
data.tar.gz: 3a7fa5aa5494de09e95aa43b67c0fd9a5ee720285095fed3be53533111905bf195edf1ea0e9638c46951694a5125d941f37dc4c908c31ca54c7265ac5a993a8e
|
data/CHANGELOG.md
CHANGED
data/lib/ayadn/fileops.rb
CHANGED
|
@@ -45,11 +45,11 @@ module Ayadn
|
|
|
45
45
|
begin
|
|
46
46
|
case File.extname(file).downcase
|
|
47
47
|
when ".png"
|
|
48
|
-
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content
|
|
48
|
+
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content=@#{file};type=image/png" -F 'public=true' -X POST`
|
|
49
49
|
when ".gif"
|
|
50
|
-
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content
|
|
50
|
+
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content=@#{file};type=image/gif" -F 'public=true' -X POST`
|
|
51
51
|
else #jpg or jpeg or JPG or JPEG, automatically recognized as such
|
|
52
|
-
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F content
|
|
52
|
+
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F content=@#{file} -F 'public=true' -X POST`
|
|
53
53
|
end
|
|
54
54
|
rescue Errno::ENOENT
|
|
55
55
|
abort(Status.no_curl)
|
data/lib/ayadn/version.rb
CHANGED