Open WhileLoop opened 7 years ago
Yeah I think you could make a YAML file that just points to files on your local machine, have you tried that?
Tried it. Maybe I got the syntax wrong?
Uploading aws with ./aws.png (node:23728) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Invalid URI "./aws.png"
Uploading aws with file://./aws.png (node:23777) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Invalid protocol: file:
Have you tried an absolute path instead of a relative one?
Absolute path didn't work either.
@WhileLoop Got it. I took a deeper dive into the upload method and realized it loads emojis using the request()
lib:
https://github.com/lambtron/emojipacks/blob/master/lib/slack.js#L188
In order to load local files, you'd have to integrate a local file reader. Here's a a similar thread: http://stackoverflow.com/questions/30851520/get-local-json-file-using-request-promise
Alternately, you could upload them somewhere temporary and take them down when you're done - you don't need to commit the .yaml file to the repo to use it!
:+1:
You can also run a local http server (e.g. python3 -m http.server
). Then you can use localhost urls.
Nice workaround @EaterOA
Any recommendations on how to generate a YAML file of a local directory of images?
Is this possible? Didn't see anything in the readme about it.