-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload file #548
Comments
update : i have update the test to be like this fit ('Verify Api will return status code 200 after successful bulk upload', async ()=> {
getting status code 415 instead on 200
|
You don't need to send the header explicitly. There is an example of how to do this here: https://www.frisbyjs.com/file-uploads-with-frisbyjs.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
im trying to upload file as shown below but im getting error regarding timeout mo matter how much its
Note that when file is uploaded from UI the name is changing from ACTIVATION.csv to ACTIVATION_09-30-2020_14-28-35.csv were this date is the current date,so user can upload multiple files, but also there is validation for the name so it can't be named to anything else except ACTIVATION.csv
so i have add these lines
const name= path.resolve('../bulkTemplate/ACTIVATION.csv'); let fileName = name.split('.')[0]+'_'; let extension = '.'+name.split('.')[1]; let uploadedFile = fileName+D.fileDateFormat+extension; // uploadedFile output will be equal to ACTIVATION_09-30-2020_14-28-35.csv
to change the file name within post request but seems im missing something
then i do the following here
return frisby.timeout(timeout)
.post('https://desdv.msdsdrl.com/api/batch/upload',{
fileName: uploadedFile // it the whole path as string not file , its posting file path
fileType: extension,
scheduledDate: "2020-01-30",
m2mAccountId: "31111",
m2mPlatform: "GMNA"
})
in other word ACTIVATION.csv should be renamed to match this format
ACTIVATION_MM-DD-YYYY_HH-MM-SS.csv first after that posted
The text was updated successfully, but these errors were encountered: