Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

Default download to USB or abort

  • Aucune réponse
  • 1 a ce problème
  • 2 vues
more options

Because I have an embedded application, I want to give the user an option to download a file to a USB stick. What I don't want is that the user is shown a "Save As..." dialog.

So I had the Idea, to make the following changes:

browser.download.dir = /mnt/usb0

browser.download.folderList = 2

... and the Default Application for the file type is set to -> Save File

The result is, that there is no Dialog shown, and the file is saved the the USB stick, nice!

Now, the Problem is when there is no usb stick connected. Since Firefox can't access /mnt/usb0, it defaults to the Downloads folder, but I want Firefox to abort the download.

Is there a way to change the "alternative default" to /dev/null or abort the download, when the path does not exist?

Because I have an embedded application, I want to give the user an option to download a file to a USB stick. What I don't want is that the user is shown a "Save As..." dialog. So I had the Idea, to make the following changes: browser.download.dir = /mnt/usb0 browser.download.folderList = 2 ... and the Default Application for the file type is set to -> Save File The result is, that there is no Dialog shown, and the file is saved the the USB stick, nice! Now, the Problem is when there is no usb stick connected. Since Firefox can't access /mnt/usb0, it defaults to the Downloads folder, but I want Firefox to abort the download. Is there a way to change the "alternative default" to /dev/null or abort the download, when the path does not exist?

Modifié le par kamocvuao