rhtyd commented on issue #62: Custom Upload Action - Template, ISO, volume
URL: 
https://github.com/apache/cloudstack-primate/issues/62#issuecomment-571421608
 
 
   @utchoang this is a tricky one as it requires an environment that can access 
SSVM public IP to upload the file, the reference/test server 
(acs.shapeblue.com) on port-forwards to the management server so you won't be 
able to access the internal ssvm public IP. The other issue is that this 
features requires the environment to be SSL enabled as the URL returned by the 
getUploadParamsForTemplate API is https enabled. For example as seen in dev 
tools:
   
   ![Screenshot from 2020-01-07 
09-03-41](https://user-images.githubusercontent.com/95203/71866693-1db65780-312d-11ea-9cc8-a0d07df50efc.png)
   
   The code for all of the upload feature (for uploading template, iso and 
volume) roughly follows this pattern:
   - Call to register the template/iso/volume via the 
getUploadParamsForTemplate/getUploadParamsForIso/getUploadParamsForVolume
   - This API returns post URL, and some secrets/signatures
   - The UI makes a HTTP post request of the file and receives 'upload 
successful' or some suitable message
   
   ![Screenshot from 2020-01-07 
09-17-48](https://user-images.githubusercontent.com/95203/71867083-b3061b80-312e-11ea-8113-0ecceb8dc774.png)
   ![Screenshot from 2020-01-07 
09-17-58](https://user-images.githubusercontent.com/95203/71867084-b39eb200-312e-11ea-944b-c1580201c8c0.png)
   
   For code reference you can see:
   https://github.com/apache/cloudstack/blob/master/ui/scripts/templates.js#L796
   
   You may try to implement this based on the above description and reference 
implementation from the old UI and I can help with testing. Let me know if 
you're unable to do so, in which case pick another task from the list (I'll 
ping you on the other tasks if you want)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to