This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.froala.examples.servlets; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.MultipartConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Busboy = require('busboy'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var sha1 = require('sha1'); | |
// Gets a filename extension. | |
function getExtension(filename) { | |
return filename.split('.').pop(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
// File Route. | |
$fileRoute = '/uploads/'; | |
$fieldname = 'file'; | |
// Get filename. |