Project

General

Profile

Bug #25115

Feature #24323: Need Support Ticket UI

Add file upload capability to support tab of new GUI

Added by Vaibhav Chauhan over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Vaibhav Chauhan
Category:
GUI (new)
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

attaching relevant conversation

William, [Jul 12, 2017, 2:25 PM]:
ok, the way we currently do that, is doing a HTTP POST call to http://freenas_ip/_upload

however the payload is a bit tricky

it must be a multipart/form-data request

with 2 items.. one called "data", which is a json in the format of:
{"method": "support.attach_ticket", "params": [{"ticket": 25001, "username": "william", "password": "abcd1234", "filename": "panic.txt"}]}

and another one called "file", which is the file itself

curl -i -X POST -H "Content-Type: multipart/form-data" -F "file=@/home/william/Downloads/panic.txt" -F 'data={"method": "support.attach_ticket", "params": [{"ticket": 25001, "username": "william", "password": "abcd1234", "filename": "panic.txt"}]}' http://192.168.100.10/_upload/

this is an example using curl

not sure how to do that in angular

there is this project: https://github.com/wangzilong/angular2-multipartForm

but it doesn't seem to be actively maintained

this might be helpful as well: https://plnkr.co/edit/eB1CiS87hSmxEnDKZMwv?p=preview

actually, that last link seem to have a working example, maybe thats all we need

History

#1 Updated by Vaibhav Chauhan about 3 years ago

  • Status changed from Screened to Resolved
  • Target version changed from 11.1 to 11.0-U3

this is now fixed and part of new UI

#2 Updated by Dru Lavigne about 3 years ago

  • Subject changed from handle add file upload capability in new support UI to Add file upload capability to support tab of new GUI

#3 Updated by Dru Lavigne about 3 years ago

  • Private changed from No to Yes

#4 Updated by Dru Lavigne almost 3 years ago

  • Target version changed from 11.0-U3 to Master - FreeNAS Nightlies
  • Private changed from Yes to No

Also available in: Atom PDF