File tree Expand file tree Collapse file tree
restcomm/restcomm.commons/src/main/java/org/restcomm/connect/commons/cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,11 +146,20 @@ private URI handleExternalUrl(final DiskCacheRequest request) throws IOException
146146 }
147147
148148 final String extension = extension (uri ).toLowerCase ();
149- final File path = new File (cacheDir + hash + "." + extension );
150- if (!path .exists ()) {
151- downloader .download (uri , path );
149+ File path = null ;
150+ if (extension .equalsIgnoreCase ("wav" )) {
151+ path = new File (cacheDir + hash + "." + extension );
152+ if (!path .exists ()) {
153+ downloader .download (uri , path );
154+ }
155+ return URI .create (this .cacheUri + hash + "." + extension );
156+ } else {
157+ path = new File (cacheDir + hash + ".wav" );
158+ if (!path .exists ()) {
159+ downloader .download (uri , path );
160+ }
161+ return URI .create (this .cacheUri + hash + ".wav" );
152162 }
153- return URI .create (this .cacheUri + hash + "." + extension );
154163 }
155164
156165 @ Override
You can’t perform that action at this time.
0 commit comments