During this, I also converted uploadFile to take either a resource or a path, and I'm using stream_get_meta_data to get the path of the stream if it's a stream. I'm also creating the stream early on, since it's being converted on at least two places (Node::overwrite() and CloudDrive->nodeExists()) to streams anyway.
This means that the recent, accepted PR of the streams-branch is kinda obsolete, but I kept the uploadStream()-method in, but converted it to just call uploadFile, so we have nice backwards compatibility.
I ran into an issue saying "400 Bad Request" with no message, when trying to upload .cr2-raw files. Renaming them to .jpg worked.
After a whole lot of debugging and research, I found a thread on Amazon's forum, specificing how the multipart should look; https://forums.developer.amazon.com/forums/thread.jspa?messageID=21591呗
So this PR covers that.
During this, I also converted uploadFile to take either a resource or a path, and I'm using stream_get_meta_data to get the path of the stream if it's a stream. I'm also creating the stream early on, since it's being converted on at least two places (Node::overwrite() and CloudDrive->nodeExists()) to streams anyway.
This means that the recent, accepted PR of the streams-branch is kinda obsolete, but I kept the uploadStream()-method in, but converted it to just call uploadFile, so we have nice backwards compatibility.