shalomweiss / mm-system-2017

MIT License
2 stars 2 forks source link

Adding new DownloadFile option #72

Open masterFoad opened 6 years ago

masterFoad commented 6 years ago

Some changes to downloading files, for now downloading pictures is still in GET request with the same syntax, But for downloading CV or Gradesheet, It will require validation: Tsofen - can view any cv or gradesheet Mentor - can view only his own mentees cv or gradesheet Mentee - can only view his own cv or gradesheet which means; -Downloading photos will be in Get request -Downloading CV and GradeSheet will be in post request with the following JSON format:

{
    <requesterType> : <id>,
    <type> : <id>,
    "token" : <token>
}

where must be (TSOFEN,MENTOR,MENTEE) and the is the requester id

masterFoad commented 6 years ago

List of routes:

//terms of service - returns TOS.pdf
/DownloadFile?file=tos
//Logos
/DownloadFile?logo=MP-LOGO-10.png
/DownloadFile?logo=logo-tsofen-tagline-trans-whiteback_2016.png
/DownloadFile?logo=logo-tsofen-black.png

/DownloadFile?logo=defaultImage

/DownloadFile?img=<user's id>

To get cv and gradesheet: /DownloadFile request format:

{
    <requesterType> : <id>,
    <type> : <id>,
    "token" : <token>
}

where must be (TSOFEN,MENTOR,MENTEE) and the is the requester id @Minitour @danielzar2710

Minitour commented 6 years ago

photo_2017-11-15_14-36-28

masterFoad commented 6 years ago

Hilarious

NajibAbuSamra commented 6 years ago

not as much as this here: image

masterFoad commented 6 years ago

@NajibAbuSamra how did you get that?

I found this in the web code:

<td width="10%">
<img src="DownloadFile?id=${ment.id}&type=img" alt="W3Schools.com">
<img src="DownloadFile?img=${ment.id}" alt="profilePic">
</td>

I believe the w3school line was removed, maybe its still there somewhere...

NajibAbuSamra commented 6 years ago

my guess is this is a work in progress, why is it in the main though looks at daniel @danielzar2710

NajibAbuSamra commented 6 years ago

@masterFoad ok this is a severe issue it seems, the following is happening on the mentee page and mentor page, please advise:

java.lang.NoClassDefFoundError: Could not initialize class mm.androidservice.download.ClientDownloadFile at mm.androidservice.download.DownloadFile.doGet(DownloadFile.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)