adn_viewer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adn_viewer.rb +2 -2
- 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: de711ff29503e71c34c0038cdb2536e463e88a75
|
4
|
+
data.tar.gz: aa8475a20c7c2fd2e9f04abf709188db821748b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa736c47727843ffdfaded403f43f20970504e1b5171f5fa360b4c136a389b5d38fee73d5ee27cc6c939e1680f5d3890d838c865b3374d272a182f51ee84077a
|
7
|
+
data.tar.gz: 5e1e80bb739ecd86b160defc060fcf4dda9ce977a96c94cbe877f84c8758b6ca6c1e02f16c2740abf2cdba7fbacd1fef459d16a3d9cd1018c4f00d7549b22caa
|
data/lib/adn_viewer.rb
CHANGED
@@ -29,7 +29,7 @@ class Adn_Viewer
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.upload_file(token, name, file)
|
32
|
-
|
32
|
+
boundary = "AaB03xZZZZZZ11322321111XSDW"
|
33
33
|
uri = URI("https://developer.api.autodesk.com/oss/v1/buckets/" + name + "/objects/" + file)
|
34
34
|
http = Net::HTTP.new(uri.host, uri.port)
|
35
35
|
http.use_ssl = true
|
@@ -38,7 +38,7 @@ class Adn_Viewer
|
|
38
38
|
request["content-type"] = 'application/octet-stream'
|
39
39
|
request["Content-Length"] = File.size(file)
|
40
40
|
request["authorization"] = 'Bearer ' + token
|
41
|
-
request.add_field('session',
|
41
|
+
request.add_field('session', boundary)
|
42
42
|
JSON.parse(http.request(request).read_body)
|
43
43
|
end
|
44
44
|
|