feinstaub/webextension_local_filesystem_links

Can i perform this as an event or pause the action by passing an attribute

hollanb opened this issue · 7 comments

i have my files encoded, so i need to unencode and copy to clients home directory then open the file.
which is only milliseconds, but when i click the link the file isn't there in time for the link to access it. so fails

is there an option to pause it for a second or 2 or keep retrying for 3 seconds, or can i perform my copy then use a trigger to click the event?

thank you in advance.

How is your copy/encoding triggered? Is the host app accessing your file and that is triggering the encoding & copying?

If that's the case I think only a retry would help. I think it's possible to change the default behavior by adding an option so the extension is retrying to open the file for 3 seconds and then display the error after the delay.

I'd like to add this as an option (opt-out by default) as the default will be a fast error display.

I'll have a look at it and let you know if that's possible.

OK, I think I have this ready. I've added a retry on failure and each retry is delayed by 100ms. I think the fixed delay is OK as you can increase the retry count if the encoding takes longer. (e.g. 10 = 1sec, 20 = 2sec etc)

The retry count can be adjusted at the settings page. It looks like in the following screenshot:
grafik

Can you please try the following version? local_filesystem_links-0.100.0
Download the xpi and install it on about:addons.

Fantastic, works like a charm, you are a legend, thank you. love this utility, very clever.
will this go to the live update now?.

on a side note, dont suppose you have written a drag from outlook to web plugin ?

only error i get is sometimes i get
Security Error: Content at https://gcbms.gcbconstructions.com/P/29D69C92-C161-4BF0-F3F53BB2553F315D may not load or link to file://///gcbms.gcbconstructions.com/gcbfiles/E24519A1-0283-B8D3-680D74E10FAAB37E/AwaitingCheckin/36449_0151-Risk-and-Opportunity-Spreadsheet.xls.

and sometimes it just doesnt open the file at all no error, then if i close firefox it pops up the brown folder and says "There was an error"

also i would maybe stop it if it is a double click or activate a different listener or allow it to be called.
not sure.
thank you again. great coding.

You're welcome.

Do you have the same behavior also with the latest version of the extension? If so you could create a new issue for it.
It's difficult for me to check the error as I'm not in the local network of gcbms.gcbconstructions.com.

What should the drag and drop from Outlook to web plugin do? I haven't created anything like this.

I'll update the extension to add the retry feature today. I don't think a double-click feature is needed as if it is working on the first try it is behaving like the previous version.

I think we can close this. Version 0.100.2 is available in the Mozilla store.

If there is an issue with the retry feature feel free to comment here and we can re-open the issue.