Add accept to file inputs
This commit is contained in:
@@ -92,6 +92,7 @@
|
||||
}
|
||||
});
|
||||
}}
|
||||
accept=".json,.opml,.csv"
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
@@ -174,6 +175,7 @@
|
||||
|
||||
await loadSettingsFromFile(files[0]);
|
||||
}}
|
||||
accept=".json"
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ export async function importSubscriptionsFromFile(file: File) {
|
||||
|
||||
const subsToImport: Subscription[] = [];
|
||||
|
||||
if (fileContents.startsWith('<opml')) {
|
||||
if (file.name.endsWith('.opml')) {
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(fileContents, 'text/xml');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user