(ctx context.Context, data wshrpc.CommandWriteAppFileData)
| 1022 | } |
| 1023 | |
| 1024 | func (ws *WshServer) WriteAppFileCommand(ctx context.Context, data wshrpc.CommandWriteAppFileData) error { |
| 1025 | if data.AppId == "" { |
| 1026 | return fmt.Errorf("must provide an appId to WriteAppFileCommand") |
| 1027 | } |
| 1028 | contents, err := base64.StdEncoding.DecodeString(data.Data64) |
| 1029 | if err != nil { |
| 1030 | return fmt.Errorf("failed to decode data64: %w", err) |
| 1031 | } |
| 1032 | return waveappstore.WriteAppFile(data.AppId, data.FileName, contents) |
| 1033 | } |
| 1034 | |
| 1035 | func (ws *WshServer) WaveFileReadStreamCommand(ctx context.Context, data wshrpc.CommandWaveFileReadStreamData) (*wshrpc.WaveFileInfo, error) { |
| 1036 | const maxStreamFileSize = 5 * 1024 * 1024 |
nothing calls this directly
no test coverage detected