Okhttp实现对大文件和视频断点上传

版权声明:本文为卫伟学习总结文章,转载请注明出处!
前言:之前项目需要上传大文件的功能,上传大文件经常遇到上传一半由于网络或者其他一些原因上传失败。然后又得重新上传(很麻烦),所以就想能不能做个断点上传得功能。于是网上搜索,发现市面上很少有断点上传得案例,有找到一些案例也是采用socket作为上传方式(大文件上传,不适合使用POST,GET形式)。由于大文件夹不适合http上传得方式,所以就能不能把大文件切割成n块小文件,然后上传这些小文件,所有小文件全部上传成功后再在服务器上进行拼接。这样不就可以实现断点上传,又解决了http不适合上传大文件得难题了吗!!
一、原理分析
Android客户端:

  • 首先,android端调用服务器接口1,参数为filename(服务器标识判断是否上传过)
  • 如果存在filename,说明之前上传过,则续传;如果没有,则从零开始上传。
  • 然后,android端调用服务器接口2,传入参数name,chunck(传到第几块),chuncks(总共多少块)
  • 为了区分多文件上传的识别,增加文件MD5和设备eid的参数。

服务器端:

  • 接口一:根据上传文件名称filename判断是否之前上传过,没有则返回客户端chunck=1,有则读取记录chunck并返回。
  • 接口二:上传文件,如果上传块数chunck=chuncks,遍历所有块文件拼接成一个完整文件。

服务端源代码
服务器接口1

@WebServlet(urlPatterns = { "/ckeckFileServlet" })
public class CkeckFileServlet extends HttpServlet {

private FileUploadStatusServiceI statusService;
String repositoryPath;
String uploadPath;

@Override
public void init(ServletConfig config) throws ServletException {
    ServletContext servletContext = config.getServletContext();
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    statusService = (FileUploadStatusServiceI) context.getBean("fileUploadStatusServiceImpl");

    repositoryPath = FileUtils.getTempDirectoryPath();
    uploadPath = config.getServletContext().getRealPath("datas/uploader");
    File up = new File(uploadPath);
    if (!up.exists()) {
        up.mkdir();
    }
}

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    // TODO Auto-generated method stub

    String fileName = new String(req.getParameter("filename"));
    //String chunk = req.getParameter("chunk");
    //System.out.println(chunk);
    System.out.println(fileName);
    resp.setContentType("text/json; charset=utf-8");

    TfileUploadStatus file = statusService.get(fileName);

    try {
        if (file != null) {
            int schunk = file.getChunk();
            deleteFile(uploadPath + schunk + "_" + fileName);
            //long off = schunk * Long.parseLong(chunkSize);
            resp.getWriter().write("{\"off\":" + schunk + "}");

        } else {
            resp.getWriter().write("{\"off\":1}");
        }
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}

服务器接口2

@WebServlet(urlPatterns = { 
 "/uploaderWithContinuinglyTransferring" })
public class UploaderServletWithContinuinglyTransferring extends HttpServlet {

private static final long serialVersionUID = 1L;

private FileUploadStatusServiceI statusService;
String repositoryPath;
String uploadPath;

@Override
public void init(ServletConfig config) throws ServletException {
    ServletContext servletContext = config.getServletContext();
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    statusService = (FileUploadStatusServiceI) context.getBean("fileUploadStatusServiceImpl");

    repositoryPath = FileUtils.getTempDirectoryPath();
    System.out.println("临时目录:" + repositoryPath);
    uploadPath = config.getServletContext().getRealPath("datas/uploader");
    System.out.println("目录:" + uploadPath);
    File up = new File(uploadPath);
    if (!up.exists()) {
        up.mkdir();
    }
}
@SuppressWarnings("unchecked")
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setCharacterEncoding("UTF-8");
    Integer schunk = null;// 分割块数
    Integer schunks = null;// 总分割数
    String name = null;// 文件名
    BufferedOutputStream outputStream = null;
    if (ServletFileUpload.isMultipartContent(request)) {
        try {
            DiskFileItemFactory factory = new DiskFileItemFactory();
            factory.setSizeThreshold(1024);
            factory.setRepository(new File(repositoryPath));// 设置临时目录
            ServletFileUpload upload = new ServletFileUpload(factory);
            upload.setHeaderEncoding("UTF-8");
            upload.setSizeMax(5 * 1024 * 1024 * 1024);// 设置附近大小
            List<FileItem> items = upload.parseRequest(request);
            // 生成新文件名

            String newFileName = null; 
            for (FileItem item : items) {
                if (!item.isFormField()) {// 如果是文件类型
                    name = newFileName;// 获得文件名
                    if (name != null) {
                        String nFname = newFileName;
                        if (schunk != null) {
                            nFname = schunk + "_" + name;
                        }
                        File savedFile = new File(uploadPath, nFname);
                        item.write(savedFile);
                    }
                } else {
                    // 判断是否带分割信息
                    if (item.getFieldName().equals("chunk")) {
                        schunk = Integer.parseInt(item.getString());
                        //System.out.println(schunk);
                    }
                    if (item.getFieldName().equals("chunks")) {
                        schunks = Integer.parseInt(item.getString());
                    }

                    if (item.getFieldName().equals("name")) {
                        newFileName = new String(item.getString());
                    }
                }
            }
            //System.out.println(schunk + "/" + schunks);
            if (schunk != null && schunk == 1) {
                TfileUploadStatus file = statusService.get(newFileName);
                if (file != null) {
                    statusService.updateChunk(newFileName, schunk);
                } else {
                    statusService.add(newFileName, schunk, schunks);
                }

            } else {
                TfileUploadStatus file = statusService.get(newFileName);
                if (file != null) {
                    statusService.updateChunk(newFileName, schunk);
                }
            }
            if (schunk != null && schunk.intValue() == schunks.intValue()) {
                outputStream = new BufferedOutputStream(new FileOutputStream(new File(uploadPath, newFileName)));
                // 遍历文件合并
                for (int i = 1; i <= schunks; i++) {
                    //System.out.println("文件合并:" + i + "/" + schunks);
                    File tempFile = new File(uploadPath, i + "_" + name);
                    byte[] bytes = FileUtils.readFileToByteArray(tempFile);
                    outputStream.write(bytes);
                    outputStream.flush();
                    tempFile.delete();
                }
                outputStream.flush();
            }
            response.getWriter().write("{\"status\":true,\"newName\":\"" + newFileName + "\"}");
        } catch (FileUploadException e) {
            e.printStackTrace();
            response.getWriter().write("{\"status\":false}");
        } catch (Exception e) {
            e.printStackTrace();
            response.getWriter().write("{\"status\":false}");
        } finally {
            try {
                if (outputStream != null)
                    outputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

android端源码
UploadTask 上传线程类

package com.jado.okhttp.video.upload;

import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;

import com.example.trafficinfo.CommandHelper;
import com.example.trafficinfo.devicesInfo;

import android.os.Environment;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import okhttp3.Call;
import okhttp3.Headers;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;

/**
 * 上传线程
 * @author weiwei
 * @date 2019/12/23
 *
*/
public class UploadTask implements Runnable {
private static final String TAG ="UploadTask";
private static String FILE_MODE = "rwd";
private OkHttpClient mClient;
private UploadTaskListener mListener;

private Builder mBuilder;
private String id; // task id
private String url; // file url
private String fileName; // File name when saving
private int uploadStatus;
private int chunck, chuncks; //流块
private int position;

private int errorCode;
static String BOUNDARY = "----------" + System.currentTimeMillis();
public static final MediaType MEDIA_TYPE_MARKDOWN = MediaType.parse("multipart/form-data;boundary=" + BOUNDARY);

public UploadTask(Builder builder) {
    mBuilder = builder;
    mClient = new OkHttpClient();
    this.id = mBuilder.id;
    this.url = mBuilder.url;
    this.fileName = mBuilder.fileName;
    this.uploadStatus = mBuilder.uploadStatus;
    this.chunck = mBuilder.chunck;
    this.setmListener(mBuilder.listener);
    // 以kb为计算单位
}

@Override
public void run() {
    try {
        int blockLength = 1024 * 1024;
        //long lastblockLength = 1024 * 1024;
        File file = new File(Environment.getExternalStorageDirectory()
                .getAbsolutePath() + File.separator + fileName);
        String md5 = getFileMD5(Environment.getExternalStorageDirectory()
                .getAbsolutePath() + File.separator + fileName);
        if (file.length() % blockLength == 0) { // 算出总块数
            chuncks = (int) file.length() / blockLength;
        } else {
            chuncks = (int) file.length() / blockLength + 1;
        }
        //lastblockLength = file.length() / blockLength;
        
        Log.i(TAG,"chuncks =" +chuncks+ "fileName =" +fileName+ "uploadStatus =" +uploadStatus);
        Log.i(TAG,"chunck =" +chunck);
        Log.i(TAG,"md5 =" +md5);
        //Log.i(TAG,"lastblockLength =" +lastblockLength);
        String eid = null;
        try {
            eid = CommandHelper.getMMCId();
            Log.i(TAG,"eid =" +eid);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        while (chunck <= chuncks
                && uploadStatus != UploadStatus.UPLOAD_STATUS_PAUSE
                && uploadStatus != UploadStatus.UPLOAD_STATUS_ERROR) {
            uploadStatus = UploadStatus.UPLOAD_STATUS_UPLOADING;
            Map<String, String> params = new HashMap<String, String>();
            params.put("filename", fileName);
            params.put("md5", md5);
            params.put("chunks", chuncks + "");
            params.put("chunk", chunck + "");
            params.put("size", blockLength + "");
            params.put("eid", eid);
            Log.i(TAG,"chunck =" +chunck+ "chuncks =" +chuncks);
            final byte[] mBlock = FileUtils.getBlock((chunck - 1)
                    * blockLength, file, blockLength);
            Log.i(TAG,"mBlock == " +mBlock.length);
            // 生成RequestBody
            MultipartBody.Builder builder = new MultipartBody.Builder();
            addParams(builder, params);
            String fileType = "file/*";
            RequestBody requestBody = RequestBody.create(
                    MediaType.parse(fileType), mBlock);
            builder.addFormDataPart("file", fileName, requestBody);
            Log.i(TAG,"url =" +url);
            
            //获得Request实例
            Request request = new Request.Builder()
                    .url(url)
                    .post(builder.build())
                    .build();
            Log.i(TAG,"RequestBody execute~");
            
            Response response = null;
                    response = mClient.newCall(request).execute();
            Log.i(TAG,"isSuccessful =" +response.isSuccessful());
            if(response.isSuccessful()) {
                String ret = response.body().string();
                Log.d(TAG,"uploadVideo  UploadTask ret:" +ret);
                onCallBack();
                chunck++;
            } else {
                uploadStatus = UploadStatus.UPLOAD_STATUS_ERROR;
                onCallBack();
            }
        }
    } catch (IOException e) {
        Log.i(TAG,"run IOException");
        uploadStatus = UploadStatus.UPLOAD_STATUS_ERROR;
        onCallBack();
        Log.i(TAG,"e error: =" +e.toString());
        e.printStackTrace();
    }
}

/**
 * 更加文件路径生成唯一的MD5值
 * @param path
 * @return
 */
public static String getFileMD5(String path) {
    BigInteger bi = null;
    try {
        byte[] buffer = new byte[8192];
        int len = 0;
        MessageDigest md = MessageDigest.getInstance("MD5");
        File f = new File(path);
        FileInputStream fis = new FileInputStream(f);
        while ((len = fis.read(buffer)) != -1) {
            md.update(buffer, 0, len);
        }
        fis.close();
        byte[] b = md.digest();
        bi = new BigInteger(1, b);
    } catch (NoSuchAlgorithmException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return bi.toString(16);
}

/**
 * 分发回调事件到UI层
 */
private void onCallBack() {
    mHandler.sendEmptyMessage(uploadStatus);
}

Handler mHandler = new Handler(Looper.getMainLooper()) {
    @Override
    public void handleMessage(android.os.Message msg) {
        int code = msg.what;
        switch(code) {
        // 上传失败
        case UploadStatus.UPLOAD_STATUS_ERROR:
            mListener.onError(UploadTask.this, errorCode, position);
            break;
        // 正在上传
        case UploadStatus.UPLOAD_STATUS_UPLOADING:
            mListener.onUploading(UploadTask.this, getDownLoadPercent(), position);
            break;
        // 暂停上传
        case  UploadStatus.UPLOAD_STATUS_PAUSE:
            mListener.onPause(UploadTask.this);
            break;
        }
    };
};

private String getDownLoadPercent() {
    String percentage = "0"; // 接收百分比得值
    if(chunck >= chuncks) {
        return "100";
    }
    
    double baiy = chunck * 1.0;
    double baiz = chuncks * 1.0;
    // 防止分母为0出现NoN
    if (baiz > 0) {
        double fen = (baiy / baiz) * 100;
        //NumberFormat nf = NumberFormat.getPercentInstance();
        //nf.setMinimumFractionDigits(2); //保留到小数点后几位
        // 百分比格式,后面不足2位的用0补齐
        //baifenbi = nf.format(fen);
        //注释掉的也是一种方法
        DecimalFormat df1 = new DecimalFormat("0");//0.00
        percentage = df1.format(fen);
    }
    return percentage;
}

private String getFileNameFromUrl(String url) {
    if (!TextUtils.isEmpty(url)) {
        return url.substring(url.lastIndexOf("/") + 1);
    }
    return System.currentTimeMillis() + "";
}

private void close(Closeable closeable) {
    try {
        closeable.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

public void setClient(OkHttpClient mClient) {
    this.mClient = mClient;
}

public Builder getBuilder() {
    return mBuilder;
}

public void setBuilder(Builder builder) {
    this.mBuilder = builder;
}

public String getId() {
    if (!TextUtils.isEmpty(id)) {
    } else {
        id = url;
    }
    return id;
}

public String getUrl() {
    return url;
}

public String getFileName() {
    return fileName;
}

public void setUploadStatus(int uploadStatus) {
    this.uploadStatus = uploadStatus;
}

public int getUploadStatus() {
    return uploadStatus;
}

public void setmListener(UploadTaskListener mListener) {
    this.mListener = mListener;
}

public static class Builder {
    private String id; // task id
    private String url; // file url
    private String fileName; // File name when saving
    private int uploadStatus = UploadStatus.UPLOAD_STATUS_INIT;
    private int chunck; // 第几块
    private UploadTaskListener listener;
    
     /**
     * 作为上传task开始、删除、停止的key值,如果为空则默认是url
     *
     * @param id
     * @return
     */
    public Builder setId(String id) {
        this.id = id;
        return this;
    }
    
     /**
     * 上传url(not null)
     *
     * @param url
     * @return
     */
    public Builder setUrl(String url) {
        this.url = url;
        return this;
    }
    
    /**
     * 设置上传状态
     *
     * @param uploadStatus
     * @return
     */
    public Builder setUploadStatus(int uploadStatus) {
        this.uploadStatus = uploadStatus;
        return this;
    }

    /**
     * 第几块
     *
     * @param chunck
     * @return
     */
    public Builder setChunck(int chunck) {
        this.chunck = chunck;
        return this;
    }


    /**
     * 设置文件名
     *
     * @param fileName
     * @return
     */
    public Builder setFileName(String fileName) {
        this.fileName = fileName;
        return this;
    }
    
    /**
     * 设置上传回调
     *
     * @param listener
     * @return
     */
    public Builder setListener(UploadTaskListener listener) {
        this.listener = listener;
        return this;
    }

    public UploadTask build() {
        return new UploadTask(this);
    }
}

private void addParams(MultipartBody.Builder builder,
        Map<String, String> params) {
    if (params != null && !params.isEmpty()) {
        for (String key : params.keySet()) {
            builder.addPart(
                    Headers.of("Content-Disposition", "form-data; name=\""
                            + key + "\""),
                    RequestBody.create(null, params.get(key)));
        }
    }
}

UploadManager上传管理器

package com.jado.okhttp.video.upload;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;
import android.content.Context;

/**
  * 上传管理器
  * @author weiwei
  * @date 2019/12/23
  *
 */
public class UploadManager {
private Context mContext;

private OkHttpClient mClient;

private int mPoolSize = 20;
// 将执行结果保存在future变量中
private Map<String, Future> mFutureMap;
private ExecutorService mExecutor;
private Map<String, UploadTask> mCurrentTaskList;

static UploadManager manager;

/**
 * 方法加锁,防止多线程操作时出现多个实例
 */
private static synchronized void init() {
    if(manager == null) {
        manager = new UploadManager();
    }
}

/**
 * 获得当前对象实例
 * @return 当前实例对象
 */
public final static UploadManager getInstance() {
    if(manager == null) {
        init();
    }
    return manager;
}

/**
 * 管理器初始化,建议在application中调用
 *
 * @param context
 */
public void init(Context context) {
    mContext = context;
    getInstance();
}

public UploadManager() {
    initOkhttpClient();

    // 初始化线程池
    mExecutor = Executors.newFixedThreadPool(mPoolSize);
    mFutureMap = new HashMap<>();
    mCurrentTaskList = new HashMap<>();
}

/**
 * 初始化okhttp
 */
private void initOkhttpClient() {
    OkHttpClient.Builder okBuilder = new OkHttpClient.Builder();
    okBuilder.connectTimeout(1000, TimeUnit.SECONDS);
    okBuilder.readTimeout(1000, TimeUnit.SECONDS);
    okBuilder.writeTimeout(1000, TimeUnit.SECONDS);
    mClient = okBuilder.build();
}

 /* 添加上传任务
  *
  * @param uploadTask
   */
public void addUploadTask(UploadTask uploadTask) {
   if (uploadTask != null && !isUploading(uploadTask)) {
       uploadTask.setClient(mClient);
       uploadTask.setUploadStatus(UploadStatus.UPLOAD_STATUS_INIT);
       // 保存上传task列表
       mCurrentTaskList.put(uploadTask.getId(), uploadTask);
       Future future = mExecutor.submit(uploadTask);
       mFutureMap.put(uploadTask.getId(), future);
   }
 }

private boolean isUploading(UploadTask task) {
   if (task != null) {
       if (task.getUploadStatus() == UploadStatus.UPLOAD_STATUS_UPLOADING) {
           return true;
       }
   }
   return false;
 }

/**
  * 暂停上传任务
  *
  * @param id 任务id
  */
 public void pause(String id) {
   UploadTask task = getUploadTask(id);
   if (task != null) {
       task.setUploadStatus(UploadStatus.UPLOAD_STATUS_PAUSE);
   }
}

/**
  * 重新开始已经暂停的上传任务
  *
  * @param id 任务id
  */
 public void resume(String id, UploadTaskListener listener) {
   UploadTask task = getUploadTask(id);
   if (task != null) {
       addUploadTask(task);
   }
 }

  /*    *//**
* 取消上传任务(同时会删除已经上传的文件,和清空数据库缓存)
   *
   * @param id       任务id
   * @param listener
 *//*
public void cancel(String id, UploadTaskListener listener) {
   UploadTask task = getUploadTask(id);
   if (task != null) {
       mCurrentTaskList.remove(id);
       mFutureMap.remove(id);
       task.setmListener(listener);
       task.cancel();
       task.setDownloadStatus(UploadStatus.DOWNLOAD_STATUS_CANCEL);
   }
 }*/

 /**
  * 实时更新manager中的task信息
  *
  * @param task
*/
 public void updateUploadTask(UploadTask task) {
   if (task != null) {
       UploadTask currTask = getUploadTask(task.getId());
       if (currTask != null) {
           mCurrentTaskList.put(task.getId(), task);
       }
   }
}

/**
* 获得指定的task
*
* @param id task id
* @return
*/
 public UploadTask getUploadTask(String id) {
   UploadTask currTask = mCurrentTaskList.get(id);
   if (currTask == null) {
           currTask = parseEntity2Task(new UploadTask.Builder().build());
           // 放入task list中
           mCurrentTaskList.put(id, currTask);
   }

   return currTask;
}

 private UploadTask parseEntity2Task(UploadTask currTask) {

   UploadTask.Builder builder = new UploadTask.Builder()//
           .setUploadStatus(currTask.getUploadStatus())
           .setFileName(currTask.getFileName())//
           .setUrl(currTask.getUrl())
           .setId(currTask.getId());

       currTask.setBuilder(builder);

   return currTask;
    }
}

FileUtils文件分块类

package com.jado.okhttp.video.upload;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

/**
  * 文件分块处理
  * @author weiwei
 *
 */
public class FileUtils {
   public static byte[] getBlock(long offset, File file, int blockSize) {
   byte[] result = new byte[blockSize];
   RandomAccessFile accessFile = null;
   try {
       accessFile = new RandomAccessFile(file, "r");
       accessFile.seek(offset);
       int readSize = accessFile.read(result);
       if (readSize == -1) {
           return null;
       } else if (readSize == blockSize) {
           return result;
       } else {
           byte[] tmpByte = new byte[readSize];
           System.arraycopy(result, 0, tmpByte, 0, readSize);
           return tmpByte;
       }


   } catch (IOException e) {
       e.printStackTrace();
   } finally {
       if (accessFile != null) {
           try {
               accessFile.close();
           } catch (IOException e1) {
           }
       }
   }
   return null;
 }

UploadTaskListener 接口类

package com.jado.okhttp.video.upload;

import java.io.File;

/**
 * create by weiwei on 19/12/23
 * @author weiwei
 *
*/
public interface UploadTaskListener {

/**
 * 上传中
 * @param uploadTask
 * @param percent
 * @param position
 */
void onUploading(UploadTask uploadTask, String percent, int position);

/**
 * 上传成功
 * @param uploadTask
 * @param file
 */
void onUploadSuccess(UploadTask uploadTask, File file);

/**
 * 上传失败
 * @param uploadTask
 * @param errorCode
 * @param position
 */
void onError(UploadTask uploadTask, int errorCode, int position);

/**
 * 上传暂停
 * @param uploadTask
 */
void onPause(UploadTask uploadTask);
}

android源码地址:
密码:0edg

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,716评论 4 364
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,558评论 1 294
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,431评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,127评论 0 209
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,511评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,692评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,915评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,664评论 0 202
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,412评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,616评论 2 245
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,105评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,424评论 2 254
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,098评论 3 238
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,096评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,869评论 0 197
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,748评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,641评论 2 271

推荐阅读更多精彩内容

  • 自上次参加完回音分享会后,我下定决心要洗心革面乖乖打基础,于是开启了这个part,争取两个月不间断更新,写完Mat...
    霖酱阅读 230评论 0 2
  • 今天中午吃完饭,妈妈带我去了我盼望已久的游乐场,我很喜欢游乐场里面大屏幕的游戏,我和小朋友玩的时候还有一个...
    李佳晨宝宝阅读 125评论 0 0
  • 大多数人在职场上都会感到工作压力。有时候,当我们在家里也要处理一些工作的时候,会把这种压力带给家人,让家人为我们担...
    知行当下阅读 1,316评论 0 1
  • 我开始恐婚, 恐婚的原因, 是因为我怕对方给不了我想要的那种生活, 我怕突然多一个人生活, 会打乱我原有的生活, ...
    自缚_a374阅读 163评论 0 1
  • 请点击蓝字收听朗读音频 夕阳,寒冷,死去 恋人的旋转木马 在原地打转 七彩灯和月亮笑开了花 虚化闪烁的情话 真挚叠...
    云中飘舞阅读 267评论 0 7