cancel file upload

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

cancel file upload

Joaquin Valdez-2
Hello!

What are ways to abort a file upload once it has been initiated ?

 <s:form beanclass="com.silly.action.UploadActionBean" enctype="multipart/form-data" >
            <div><s:hidden name="ins"/></div>
            <div class="clear"></div>
            <fmt:message key="insuploadfrm.instruction"/>
            <br>
            <fmt:message key="insuploadfrm.notes"/>
            <div id="form-topupload">
                <div id="f1"></div>
                <div id="i1"><s:errors globalErrorsOnly="false"/></div>
                <div class="clear"></div>
                <div id="f1"><s:label for="ins.attachments"/>:</div>
                <c:forEach var="index" begin="0" end="0">
                    <div  id="i1"><s:file name="attachments[${index}]"/>
                    </div>
                </c:forEach>
                <div class="clear"></div>
                <div id="f1"></div>
                <div id="i1">
                    <s:submit  class="button" name="save" />&nbsp;
                    <s:submit  class="button" name="cancel"/>
                </div>
            </div>
</s:form>

Thanks,
Joaquin


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: cancel file upload

VANKEISBELCK Remi
You mean from the browser, or server side?

Cheers

Rémi

De : [hidden email]
Envoyé : ‎16/‎01/‎2015 05:52
À : [hidden email]
Objet : [Stripes-users] cancel file upload

Hello!

What are ways to abort a file upload once it has been initiated ?

 <s:form beanclass="com.silly.action.UploadActionBean" enctype="multipart/form-data" >
            <div><s:hidden name="ins"/></div>
            <div class="clear"></div>
            <fmt:message key="insuploadfrm.instruction"/>
            <br>
            <fmt:message key="insuploadfrm.notes"/>
            <div id="form-topupload">
                <div id="f1"></div>
                <div id="i1"><s:errors globalErrorsOnly="false"/></div>
                <div class="clear"></div>
                <div id="f1"><s:label for="ins.attachments"/>:</div>
                <c:forEach var="index" begin="0" end="0">
                    <div  id="i1"><s:file name="attachments[${index}]"/>
                    </div>
                </c:forEach>
                <div class="clear"></div>
                <div id="f1"></div>
                <div id="i1">
                    <s:submit  class="button" name="save" />&nbsp;
                    <s:submit  class="button" name="cancel"/>
                </div>
            </div>
</s:form>

Thanks,
Joaquin


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: cancel file upload

Rick Grashel
In reply to this post by Joaquin Valdez-2
A redirect is a quick and easy way to stop a file upload.  On the form, you could have a (modal) file upload progress indicator which has a "Cancel" link or button under (or next to) it.  Clicking "Cancel" can trigger a redirect back to the same page with a Stripes global message confirmation -- Upload Has Been Cancelled.  I've done this a few times before and it works pretty well.

-- Rick

On Thu, Jan 15, 2015 at 10:51 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

What are ways to abort a file upload once it has been initiated ?

 <s:form beanclass="com.silly.action.UploadActionBean" enctype="multipart/form-data" >
            <div><s:hidden name="ins"/></div>
            <div class="clear"></div>
            <fmt:message key="insuploadfrm.instruction"/>
            <br>
            <fmt:message key="insuploadfrm.notes"/>
            <div id="form-topupload">
                <div id="f1"></div>
                <div id="i1"><s:errors globalErrorsOnly="false"/></div>
                <div class="clear"></div>
                <div id="f1"><s:label for="ins.attachments"/>:</div>
                <c:forEach var="index" begin="0" end="0">
                    <div  id="i1"><s:file name="attachments[${index}]"/>
                    </div>
                </c:forEach>
                <div class="clear"></div>
                <div id="f1"></div>
                <div id="i1">
                    <s:submit  class="button" name="save" />&nbsp;
                    <s:submit  class="button" name="cancel"/>
                </div>
            </div>
</s:form>

Thanks,
Joaquin


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: cancel file upload

Joaquin Valdez-2
In reply to this post by VANKEISBELCK Remi
Given the code below, If I selected a file to be uploaded then pressed save, the upload begins.  A client wants to be able to click a button on the page to cancel the upload. 

Joaquin


On Jan 16, 2015, at 5:13 AM, Remi Vankeisbelck <[hidden email]> wrote:

You mean from the browser, or server side?

Cheers

Rémi

De : [hidden email]
Envoyé : ‎16/‎01/‎2015 05:52
À : [hidden email]
Objet : [Stripes-users] cancel file upload

Hello!

What are ways to abort a file upload once it has been initiated ?

 <s:form beanclass="com.silly.action.UploadActionBean" enctype="multipart/form-data" >
            <div><s:hidden name="ins"/></div>
            <div class="clear"></div>
            <fmt:message key="insuploadfrm.instruction"/>
            <br>
            <fmt:message key="insuploadfrm.notes"/>
            <div id="form-topupload">
                <div id="f1"></div>
                <div id="i1"><s:errors globalErrorsOnly="false"/></div>
                <div class="clear"></div>
                <div id="f1"><s:label for="ins.attachments"/>:</div>
                <c:forEach var="index" begin="0" end="0">
                    <div  id="i1"><s:file name="attachments[${index}]"/>
                    </div>
                </c:forEach>
                <div class="clear"></div>
                <div id="f1"></div>
                <div id="i1">
                    <s:submit  class="button" name="save" />&nbsp;
                    <s:submit  class="button" name="cancel"/>
                </div>
            </div>
</s:form>

Thanks,
Joaquin

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: cancel file upload

Joaquin Valdez-2
In reply to this post by Rick Grashel
Thanks Rick!  If  you don’t mind too much, do you have a  small example of what that would look like?

Joaquin

On Jan 16, 2015, at 5:23 AM, Rick Grashel <[hidden email]> wrote:

A redirect is a quick and easy way to stop a file upload.  On the form, you could have a (modal) file upload progress indicator which has a "Cancel" link or button under (or next to) it.  Clicking "Cancel" can trigger a redirect back to the same page with a Stripes global message confirmation -- Upload Has Been Cancelled.  I've done this a few times before and it works pretty well.

-- Rick

On Thu, Jan 15, 2015 at 10:51 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

What are ways to abort a file upload once it has been initiated ?

 <s:form beanclass="com.silly.action.UploadActionBean" enctype="multipart/form-data" >
            <div><s:hidden name="ins"/></div>
            <div class="clear"></div>
            <fmt:message key="insuploadfrm.instruction"/>
            <br>
            <fmt:message key="insuploadfrm.notes"/>
            <div id="form-topupload">
                <div id="f1"></div>
                <div id="i1"><s:errors globalErrorsOnly="false"/></div>
                <div class="clear"></div>
                <div id="f1"><s:label for="ins.attachments"/>:</div>
                <c:forEach var="index" begin="0" end="0">
                    <div  id="i1"><s:file name="attachments[${index}]"/>
                    </div>
                </c:forEach>
                <div class="clear"></div>
                <div id="f1"></div>
                <div id="i1">
                    <s:submit  class="button" name="save" />&nbsp;
                    <s:submit  class="button" name="cancel"/>
                </div>
            </div>
</s:form>

Thanks,
Joaquin


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users