Open mantishK opened 8 years ago
I think a link to the file will be good.
[field_name](/path/to/file)
field_name
- the name of the field to update with/path/to/file
- the path to the file to uploadHow does that sound? It means that, when rendered, the user could even preview the file.
It means that the files to be uploaded while testing will have to be in a repo/server and the files need to be public. This may not always be the case, correct? Also, while testing, silk will download each file and then upload them. It may consume a lot of time if there are too many files/tests. It would be great if we keep the link and have some way of overriding the base path that contains the files to be uploaded. Your thoughts?
Silk runs locally (so far) so the files would be nearby, I think they would only get uploaded, and probably to a local server. I think selective test running will help people avoid long-running tests, as would have to be the case anyway.
If we are giving local file path, then there are no issues as far as the working of silk is considered. Wouldn't it be hard to share the test docs to others? By hard, I mean, due to local path, the links may not open on other machines.
I'm thinking you'd have this:
/tests
/files
image1.png
/silk
thumbnails.silk.md
(would mention `../files/image1.png`)
So the files would go alongside the test files. For bigger files, a script to download the files into the correct place might be sensible, but out of scope of Silk.
How does that sound?
Sounds good.
I don't know Go at all but I can test a branch and provide some feedback once the feature is implemented given that I'll need it for a project.
Support multipart data and uploading file as a form parameter in POST and PUT methods. There can be a folder that contains all the files that will be uploaded while testing, this path can be set as an argument while running silk. The names of the file mentioned in the markdown could be relative to this folder. We can add a comment after the field that the filed is a file field and it's value is a file path.