Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35001 > unrolled thread

Web app to local file system.

Started byAndrew Poulos <ap_prog@hotmail.com>
First post2018-05-11 15:45 +1000
Last post2018-05-12 02:42 -0700
Articles 10 — 5 participants

Back to article view | Back to comp.lang.javascript


Contents

  Web app to local file system. Andrew Poulos <ap_prog@hotmail.com> - 2018-05-11 15:45 +1000
    Re: Web app to local file system. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-11 09:15 +0200
      Re: Web app to local file system. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-11 09:44 +0200
    Re: Web app to local file system. Julio Di Egidio <julio@diegidio.name> - 2018-05-11 01:53 -0700
    Re: Web app to local file system. Dr.Kral@nyc.rr.com - 2018-05-11 10:18 -0400
      Re: Web app to local file system. Dr.Kral@nyc.rr.com - 2018-05-11 12:29 -0400
        Re: Web app to local file system. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-11 21:39 +0200
          Re: Web app to local file system. Dr.Kral@nyc.rr.com - 2018-05-11 17:29 -0400
            Re: Web app to local file system. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-12 14:38 +0200
    Re: Web app to local file system. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-12 02:42 -0700

#35001 — Web app to local file system.

FromAndrew Poulos <ap_prog@hotmail.com>
Date2018-05-11 15:45 +1000
SubjectWeb app to local file system.
Message-ID<fc6dnQf8wI9gsGjHnZ2dnUU7-WHNnZ2d@westnet.com.au>
I've been asked to build a web app that will only be used within the 
company. The app allows users to assemble content (images, video...) 
into a series of pages.

Except for the app itself I'm not going to be given additional space on 
the server nor access to server side coding.

Using the File api I can track/display content the user selects the 
first time but when the browser is closed I lose it all.

Is there a way for a user to nominate a folder on their computer into 
which the app can store/retrieve content without overly compromising 
security?

I note that Mozilla has LocalFileSystem and a File and Directory Entries 
API but it's not for production use.

Andrew Poulos

[toc] | [next] | [standalone]


#35002

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-05-11 09:15 +0200
Message-ID<XnsA8DF5E39ECF34eejj99@194.109.6.166>
In reply to#35001
Andrew Poulos <ap_prog@hotmail.com> wrote on 11 May 2018 in 
comp.lang.javascript:

> I've been asked to build a web app that will only be used within the 
> company. The app allows users to assemble content (images, video...) 
> into a series of pages.
> 
> Except for the app itself I'm not going to be given additional space on 
> the server nor access to server side coding.
> 
> Using the File api I can track/display content the user selects the 
> first time but when the browser is closed I lose it all.
> 
> Is there a way for a user to nominate a folder on their computer into 
> which the app can store/retrieve content without overly compromising 
> security?
> 
> I note that Mozilla has LocalFileSystem and a File and Directory Entries 
> API but it's not for production use.

Meseems it is rolled out to all modern browsers:

window.localStorage 
    	- stores data with no expiration date

window.sessionStorage 
    	- stores data for one session
    	(data is lost when the browser tab is closed)

<https://www.w3schools.com/html/html5_webstorage.asp>

=============

The Google Chrome I use now 
Version 67.0.3396.40 (Official Build) beta (64-bit)
responds to a test with:

localStorage: limited to 5101 k characters
sessionStorage: limited to 5101 k characters
globalStorage: not supported

<http://dev-test.nemikor.com/web-storage/support-test/>

===============

see also:

<https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage>

<https://html5demos.com/storage/>

with warning:

<https://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage>

with possible issues:

<https://caniuse.com/#feat=namevalue-storage>

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35003

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-05-11 09:44 +0200
Message-ID<XnsA8DF6318C8311eejj99@194.109.6.166>
In reply to#35002
"Evertjan." <exxjxw.hannivoort@inter.nl.net> wrote on 11 May 2018 in 
comp.lang.javascript:

> Andrew Poulos <ap_prog@hotmail.com> wrote on 11 May 2018 in 
> comp.lang.javascript:
> 
>> I've been asked to build a web app that will only be used within the 
>> company. The app allows users to assemble content (images, video...) 
>> into a series of pages.
>> 
>> Except for the app itself I'm not going to be given additional space on 
>> the server nor access to server side coding.
>> 
>> Using the File api I can track/display content the user selects the 
>> first time but when the browser is closed I lose it all.
>> 
>> Is there a way for a user to nominate a folder on their computer into 
>> which the app can store/retrieve content without overly compromising 
>> security?
>> 
>> I note that Mozilla has LocalFileSystem and a File and Directory Entries 
>> API but it's not for production use.
> 
> Meseems it is rolled out to all modern browsers:
> 
> window.localStorage 
>          - stores data with no expiration date
> 
> window.sessionStorage 
>          - stores data for one session
>          (data is lost when the browser tab is closed)
> 
> <https://www.w3schools.com/html/html5_webstorage.asp>
> 
> =============
> 
> The Google Chrome I use now 
> Version 67.0.3396.40 (Official Build) beta (64-bit)
> responds to a test with:
> 
> localStorage: limited to 5101 k characters
> sessionStorage: limited to 5101 k characters
> globalStorage: not supported
> 
> <http://dev-test.nemikor.com/web-storage/support-test/>
> 
> ===============
> 
> see also:
> 
> <https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage>
> 
> <https://html5demos.com/storage/>
> 
> with warning:
> 
> <https://html.spec.whatwg.org/multipage/webstorage.html#dom-localstorage>
> 
> with possible issues:
> 
> <https://caniuse.com/#feat=namevalue-storage>

And from the armchair:

<https://youtu.be/OsKmRlSM98o> 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35004

FromJulio Di Egidio <julio@diegidio.name>
Date2018-05-11 01:53 -0700
Message-ID<29ccc0c5-5dd0-4835-b542-81783c3b15bf@googlegroups.com>
In reply to#35001
On Friday, 11 May 2018 07:45:45 UTC+2, Andrew Poulos  wrote:
<snip>
> Is there a way for a user to nominate a folder on their computer into 
> which the app can store/retrieve content without overly compromising 
> security?

Basically you do not have access to arbitrary locations on the local machine.

> I note that Mozilla has LocalFileSystem and a File and Directory Entries 
> API but it's not for production use.

A very significant problem is that pretty much all browsers (but I have checked
last year) will not guarantee that data is kept permanently, not even in the
non-temporary locations.

Another huge problem is that there is very little to almost no consistency
between the different implementations.

And I know no good solutions except indeed browser plugins/extensions...

Julio

[toc] | [prev] | [next] | [standalone]


#35005

FromDr.Kral@nyc.rr.com
Date2018-05-11 10:18 -0400
Message-ID<5a9bfdhgopvc92fqrmtv76bsa0421c3ht6@4ax.com>
In reply to#35001
On Fri, 11 May 2018 15:45:33 +1000, Andrew Poulos <ap_prog@hotmail.com>
wrote in <fc6dnQf8wI9gsGjHnZ2dnUU7-WHNnZ2d@westnet.com.au>:

>I've been asked to build a web app that will only be used within the 
>company. The app allows users to assemble content (images, video...) 
>into a series of pages.
<snip>

Andrew,

I've recently run into the same blocks that you have.  You might find
something of interest in the thread I started "Blob write complete event ?"
on May 1 in this group.  (Please ignore the off topic discussion (argument)
mixed into it.)

The security protections in the browsers are quite strict and protect the
actual file system vigorously.  I have even found that ‘local' is
frequently (if not always) different that previous uses.  It appears to me
that the ‘file system' API is totally separate from the actual file system
and thus probably not of use in the application you described.

I have found that a local page that creates a new window, has the different
origin problem even to access local storage.  Security is very strict.

I also found that I can access the real file system to read and the onload
event indicates completion.  I could not find a corresponding write event
and will just use a 2-4 second delay and hope.  Also, one can not rename
the file name objects but must use what one has read thus writing
fileName(1).htm etc.

HTH

If you would like to see what I have done, email a request.

K.



[toc] | [prev] | [next] | [standalone]


#35006

FromDr.Kral@nyc.rr.com
Date2018-05-11 12:29 -0400
Message-ID<55hbfdp3kto9u3985ql6a1d1ntc4v3st37@4ax.com>
In reply to#35005
An alternative.

Collect the data from the user's page in a form and submit it (to upload to
the server).  Then return it to the user as a new page which can be saved
in the normal file system without trouble.  Delete from server.

[toc] | [prev] | [next] | [standalone]


#35007

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-05-11 21:39 +0200
Message-ID<XnsA8DFDC678F56eejj99@194.109.6.166>
In reply to#35006
Dr.Kral@nyc.rr.com wrote on 11 May 2018 in comp.lang.javascript:

> An alternative.
> 
> Collect the data from the user's page in a form and submit it (to upload to
> the server).  Then return it to the user as a new page which can be saved
> in the normal file system without trouble.  Delete from server.

... and do this without serverside code?

Not.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35008

FromDr.Kral@nyc.rr.com
Date2018-05-11 17:29 -0400
Message-ID<qn2cfdher6u1dg8s6f2gf95d21eue7j6ns@4ax.com>
In reply to#35007
On Fri, 11 May 2018 21:39:59 +0200, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote in
<XnsA8DFDC678F56eejj99@194.109.6.166>:

>Dr.Kral@nyc.rr.com wrote on 11 May 2018 in comp.lang.javascript:
>
>> An alternative.
>> 
>> Collect the data from the user's page in a form and submit it (to upload to
>> the server).  Then return it to the user as a new page which can be saved
>> in the normal file system without trouble.  Delete from server.
>
>... and do this without serverside code?
>
>Not.

It can be part of the app which is granted space on the server.

[toc] | [prev] | [next] | [standalone]


#35011

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-05-12 14:38 +0200
Message-ID<XnsA8E094F3C2BA2eejj99@194.109.6.166>
In reply to#35008
Dr.Kral@nyc.rr.com wrote on 11 May 2018 in comp.lang.javascript:

> On Fri, 11 May 2018 21:39:59 +0200, "Evertjan."
> <exxjxw.hannivoort@inter.nl.net> wrote in
> <XnsA8DFDC678F56eejj99@194.109.6.166>:
> 
>>Dr.Kral@nyc.rr.com wrote on 11 May 2018 in comp.lang.javascript:
>>
>>> An alternative.
>>> 
>>> Collect the data from the user's page in a form and submit it (to
>>> upload to the server).  Then return it to the user as a new page which
>>> can be saved in the normal file system without trouble.  Delete from
>>> server. 
>>
>>... and do this without serverside code?
>>
>>Not.
> 
> It can be part of the app which is granted space on the server.

The OP SPECIFIED that that grand was not the case. 

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35009

FromJonas Thörnvall <jonas.thornvall@gmail.com>
Date2018-05-12 02:42 -0700
Message-ID<74fd23a7-050a-422f-8905-c8c834b209fa@googlegroups.com>
In reply to#35001
Den fredag 11 maj 2018 kl. 07:45:45 UTC+2 skrev Andrew Poulos:
> I've been asked to build a web app that will only be used within the 
> company. The app allows users to assemble content (images, video...) 
> into a series of pages.
> 
> Except for the app itself I'm not going to be given additional space on 
> the server nor access to server side coding.
> 
> Using the File api I can track/display content the user selects the 
> first time but when the browser is closed I lose it all.
> 
> Is there a way for a user to nominate a folder on their computer into 
> which the app can store/retrieve content without overly compromising 
> security?
> 
> I note that Mozilla has LocalFileSystem and a File and Directory Entries 
> API but it's not for production use.
> 
> Andrew Poulos

From the little i figured out the only way it will load and save is from default download folder. But it may be possible to set download folder from some browsers?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web