-
Notifications
You must be signed in to change notification settings - Fork 59
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
Server Implementation #2
Comments
While implementing the video functionality within RTE, I realized a memory issue would occur by loading so much base64 inside a variable. Many websites only allow one media file to be uploaded. I'm currently reading up on how to upload media files, and, to my dismay...
Edit: I realized that I should probably mention that most server-users of this package will be using JSON to send data which is why I had that original concern for separate requests sending images and then sending the data itself. |
Lastly, I might have to have two separate RichTextEditors: one for offline and one for online. The offline one will have to save media files within file manager while the server-based one will have to have some wild functionalities. |
Resolved the server functionality vs. offline functionality. The server needs to use an HTML parser like BeautifulSoup4. Grab the video tags and identify which ones have IDs. Those that do (should) have base64 encoded videos and can be utilized to upload those videos to AWS S3. This is necessary as a background check so that there is a certain limit on your API. If the video is simply a link, then there is no id to the video tag. If the video is supposed to be offline, then the base64 is left encoded. |
There needs to be a better way for having server implementation that can cooperate with img and video uploads. Most servers will not be sending base64 encoded img and videos inside their tags, so, instead, the JS should strip the base64 encoded data from the img tags, give them an id (e.g. 0, 1, 2) which will coincide with an array in the JS that a Swift function can access when a required function is called.
We must also be able to offer users the option of saving the base64 inside the HTML instead of stripping it away, in case a user of this package is using this for offline use, as well.
The text was updated successfully, but these errors were encountered: