You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/01/07 03:50:58 UTC
[GitHub] [cloudstack-primate] rhtyd commented on issue #62: Custom Upload
Action - Template, ISO, volume
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:

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


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:
users@infra.apache.org
With regards,
Apache Git Services